CN111813550A - Data processing method, device, server and storage medium - Google Patents
Data processing method, device, server and storage medium Download PDFInfo
- Publication number
- CN111813550A CN111813550A CN202010651605.2A CN202010651605A CN111813550A CN 111813550 A CN111813550 A CN 111813550A CN 202010651605 A CN202010651605 A CN 202010651605A CN 111813550 A CN111813550 A CN 111813550A
- Authority
- CN
- China
- Prior art keywords
- data
- request
- slave
- record
- unsynchronized
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0793—Remedial or corrective actions
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24552—Database cache management
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4482—Procedural
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Quality & Reliability (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域technical field
本申请涉及数据处理技术领域,尤其涉及一种数据处理方法、装置、服务器和存储介质。The present application relates to the technical field of data processing, and in particular, to a data processing method, device, server and storage medium.
背景技术Background technique
在涉及数据量较大且对数据读写性能要求较高的业务场景中,业务服务平台一般会通过进程缓存数据并处理数据读写请求,以实现较为高效的数据读写处理。In business scenarios involving a large amount of data and high requirements for data read and write performance, the business service platform generally caches data through processes and processes data read and write requests to achieve more efficient data read and write processing.
目前,业务服务平台通过进程处理数据读写请求的常用方式有两种:一种是单进程方式,另一种是主从进程方式。其中,单进程方式是指通过单个进程同时处理读请求和写请求。单进程方式的好处是无需数据同步,也就不存在数据不一致的情况,但是由于单进程的读写压力大,导致客户端请求延时较长。在主从进程方式中,业务服务平台会运行一个主进程和至少一个从进程。其中,主进程负责处理客户端的写请求,并将数据同步到从进程,在此基础上,从进程负责处理客户端的读请求,从而可以降低主进程的数据读写压力,有利于提高数据读写效率,减少请求处理时延。但是,在主从进程方式中,却可能由于主进程向从进程同步数据不及时,使得主进程和从进程数据不一致,从而从进程反馈给客户端的数据有误或者数据读取异常。可见,如何在减少请求处理时延的同时,能够减少由于数据不一致而导致数据读取错误或异常的情况是本领域技术人员迫切需要解决的技术问题。At present, there are two common ways for the business service platform to process data read and write requests through processes: one is a single process method, and the other is a master-slave process method. The single-process mode refers to processing read requests and write requests at the same time through a single process. The advantage of the single-process mode is that there is no need for data synchronization, so there is no data inconsistency. However, due to the high read and write pressure of a single process, the client request delay is long. In the master-slave process mode, the business service platform will run a master process and at least one slave process. Among them, the master process is responsible for processing the client's write request and synchronizing the data to the slave process. On this basis, the slave process is responsible for processing the client's read request, which can reduce the data read and write pressure of the master process and help improve data read and write. efficiency and reduce request processing delay. However, in the master-slave process mode, the data of the master process and the slave process may be inconsistent due to the untimely synchronization of data from the master process to the slave process, so that the data fed back from the slave process to the client is incorrect or the data is read abnormally. It can be seen that how to reduce the data read error or exception caused by data inconsistency while reducing the request processing delay is a technical problem that those skilled in the art urgently need to solve.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本申请提供了一种数据处理方法、装置、服务器和存储介质,以在提高数据请求处理效率,减少数据请求处理时延的同时,能够降低由于主、从进程数据不一致而导致的数据读取错误或异常的情况。In view of this, the present application provides a data processing method, device, server and storage medium, so as to improve the data request processing efficiency and reduce the data request processing delay, while reducing the data inconsistency between master and slave process data. Data read errors or exceptions.
为实现上述目的,本申请提供了如下技术方案:To achieve the above purpose, the application provides the following technical solutions:
一方面,本申请提供了一种数据处理方法,应用于业务服务平台,所述业务服务平台运行有主进程和至少一个从进程,所述方法包括:On the one hand, the present application provides a data processing method, which is applied to a business service platform. The business service platform runs a master process and at least one slave process, and the method includes:
获得客户端发送的数据处理请求;Obtain the data processing request sent by the client;
在所述数据处理请求包括读请求的情况下,确定所述读请求所请求读取的数据的第一数据标识;In the case that the data processing request includes a read request, determining a first data identifier of the data requested by the read request;
如所述第一数据标识属于缓存的未同步记录中的数据标识,将所述读请求转发给所述主进程处理,所述未同步记录中记录有尚未从所述主进程同步到所述从进程的数据对应的数据标识;If the first data identifier belongs to the data identifier in the cached unsynchronized record, the read request is forwarded to the master process for processing, and the unsynchronized record records that the master process has not yet been synchronized to the slave The data identifier corresponding to the data of the process;
如所述第一数据标识不属于所述未同步记录中的数据标识,将所述读请求转发给所述从进程处理。If the first data identifier does not belong to the data identifier in the unsynchronized record, the read request is forwarded to the slave process for processing.
在一种可能的实现方式中,该方法还包括:In a possible implementation, the method further includes:
在所述数据处理请求包括写请求的情况下,确定所述写请求所请求写入的数据的第二数据标识;In the case that the data processing request includes a write request, determining a second data identifier of the data requested to be written by the write request;
将所述写请求转发给所述主进程处理,并将所述第二数据标识添加到所述未同步记录中。The write request is forwarded to the main process for processing, and the second data identifier is added to the unsynchronized record.
在又一种可能的实现方式中,还包括:In yet another possible implementation, it also includes:
获得所述主进程反馈的同步完成指示,所述同步完成指示携带有第三数据标识,且所述同步完成指示用于表征所述主进程已将所述第三数据标识表示的数据同步到所述从进程;Obtain the synchronization completion indication fed back by the main process, the synchronization completion indication carries a third data identifier, and the synchronization completion indication is used to represent that the main process has synchronized the data represented by the third data identifier to the Describe the slave process;
删除所述未同步记录中的所述第三数据标识。Delete the third data identifier in the unsynchronized record.
在又一种可能的实现方式中,所述业务服务平台运行有多个从进程;In yet another possible implementation manner, the business service platform runs with multiple slave processes;
所述方法还包括:The method also includes:
在确认所述主进程出现故障的情况下,查询所述多个从进程各自存储的同步序号,其中,所述同步序号表征所述主进程向从进程同步数据的总数量;In the case of confirming that the master process is faulty, query the synchronization sequence numbers stored by the multiple slave processes, wherein the synchronization sequence numbers represent the total amount of data synchronized from the master process to the slave processes;
基于所述多个从进程各自存储的同步序号,确定从所述主进程获得同步数据的总数量最多的目标从进程;determining, based on the synchronization sequence numbers stored by the multiple slave processes, the target slave process that obtains the largest total number of synchronization data from the master process;
将所述目标从进程确定为主进程。The target slave process is determined to be the master process.
又一方面,本申请还提供了一种数据处理装置,应用于业务服务平台,所述业务服务平台运行有主进程和至少一个从进程,所述装置包括:In another aspect, the present application also provides a data processing device, which is applied to a business service platform, where the business service platform runs a master process and at least one slave process, and the device includes:
请求获得单元,用于获得客户端发送的数据处理请求;The request obtaining unit is used to obtain the data processing request sent by the client;
第一标识确定单元,用于在所述数据处理请求包括读请求的情况下,确定所述读请求所请求读取的数据的第一数据标识;a first identification determination unit, configured to determine a first data identification of the data requested by the read request when the data processing request includes a read request;
第一请求处理单元,用于如所述第一数据标识属于缓存的未同步记录中的数据标识,将所述读请求转发给所述主进程处理,所述未同步记录中记录有尚未从所述主进程同步到所述从进程的数据对应的数据标识;The first request processing unit is configured to forward the read request to the main process for processing if the first data identifier belongs to the data identifier in the unsynchronized record of the cache, and the unsynchronized record records the data that has not been retrieved from the cache. the data identifier corresponding to the data of the master process synchronized to the slave process;
第二请求处理单元,用于如所述第一数据标识不属于所述未同步记录中的数据标识,将所述读请求转发给所述从进程处理。A second request processing unit, configured to forward the read request to the slave process for processing if the first data identifier does not belong to the data identifier in the unsynchronized record.
又一方面,本申请还提供了一种服务器,包括存储器和处理器;In yet another aspect, the present application also provides a server, including a memory and a processor;
其中,所述存储器用于存储程序;Wherein, the memory is used to store programs;
所述处理器用于执行所述程序,所述程序被执行时,具体用于实现如权利要求1至6任意一项所述的数据处理方法。The processor is configured to execute the program, and when the program is executed, it is specifically configured to implement the data processing method according to any one of claims 1 to 6.
又一方面,本申请还提供了一种存储介质,用于存储程序,所述程序被执行时,用于实现如上任意一项所述的数据处理方法。In another aspect, the present application also provides a storage medium for storing a program, which, when executed, is used to implement the data processing method described in any one of the above.
由以上内容可知,本申请业务服务平台缓存有未同步记录,该未同步记录中存储有尚未完成从主进程同步到从进程的数据对应的数据标识。基于此,本申请在接收到客户端的读请求之后,只有在该未同步记录不包括该读请求所请求的数据标识,即确认读请求所请求的数据已经由主进程同步到从进程的情况下,才会将该读请求转发给从进程处理;而如果未同步记录中包括该读请求所请求的数据标识,仍会将该读请求转发给主进程处理,从而在最大限度减少的主进程处理的读请求数量的前提下,降低了由于主进程与从进程之间数据不一致而导致的数据读取错误或异常,进而实现了在提高请求处理效率的同时,减少数据读取错误或者异常的情况。It can be seen from the above that the business service platform of the present application caches an unsynchronized record, and the unsynchronized record stores the data identifier corresponding to the data that has not been synchronized from the master process to the slave process. Based on this, after the application receives the read request from the client, only if the unsynchronized record does not include the data identifier requested by the read request, that is, it is confirmed that the data requested by the read request has been synchronized by the master process to the slave process. , the read request will be forwarded to the slave process for processing; and if the unsynchronized record includes the data identifier requested by the read request, the read request will still be forwarded to the master process for processing, thus minimizing the amount of time the master process handles. Under the premise of increasing the number of read requests, the data read errors or exceptions caused by data inconsistency between the master process and the slave process are reduced, thereby improving the request processing efficiency and reducing data read errors or exceptions. .
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained according to the provided drawings without any creative effort.
图1示出了本申请所适用的一种场景的组成架构示意图;FIG. 1 shows a schematic diagram of the composition structure of a scenario to which the present application applies;
图2示出了本申请的数据处理方法一个实施例的流程示意图;FIG. 2 shows a schematic flowchart of an embodiment of the data processing method of the present application;
图3示出了本申请的数据处理方法的一种实现原理框架示意图;FIG. 3 shows a schematic diagram of an implementation principle framework of the data processing method of the present application;
图4示出了本申请的数据处理方法又一个实施例的流程交互示意图;FIG. 4 shows a schematic diagram of flow interaction of another embodiment of the data processing method of the present application;
图5示出了本申请中路由进程从多个从进程中选取主进程的一种流程示意图;Fig. 5 shows a kind of schematic flow chart that the routing process selects the master process from multiple slave processes in the present application;
图6示出了路由进程选取主进程的一个示例示意图;Fig. 6 shows an exemplary schematic diagram of the routing process selecting the main process;
图7示出了本申请的数据处理装置的一种组成结构示意图;FIG. 7 shows a schematic diagram of a composition structure of the data processing apparatus of the present application;
图8示出了本申请的服务器的一种组成架构示意图。FIG. 8 shows a schematic diagram of a composition structure of the server of the present application.
具体实施方式Detailed ways
本申请的数据处理方法适用于多种业务场景中的业务服务平台。如,在业务场景为游戏业务场景的情况下,该业务服务平台为游戏服务平台,相应的,游戏客户端可以向游戏服务平台请求读取或者写入游戏相关的数据。又如,在业务场景为金融交易业务的情况下,业务服务平台为交易服务平台,在该种场景中,客户端在进行支付或者转账等业务的情况下,都可能会涉及到向业务服务平台请求读取或者写入数据。当然,本申请所适用的业务场景还可以有其他可能,对此不加限制。The data processing method of the present application is suitable for business service platforms in various business scenarios. For example, if the business scenario is a game business scenario, the business service platform is a game service platform, and accordingly, the game client can request the game service platform to read or write game-related data. For another example, in the case where the business scenario is financial transaction business, the business service platform is the transaction service platform. In this scenario, when the client performs payment or transfer services, it may involve sending money to the business service platform. Request to read or write data. Of course, the business scenario to which this application applies may also have other possibilities, which are not limited.
在本申请中,该业务服务平台可以是独立的服务器,也可以是由多台服务器构成的云平台、服务器集群或者分布式系统等等。In this application, the business service platform may be an independent server, or may be a cloud platform, a server cluster, or a distributed system composed of multiple servers, or the like.
在本申请实施例中,业务服务平台上运行有用于处理读或写请求的主进程,以及用于辅助该主进程处理读请求的至少一个从进程。In this embodiment of the present application, a master process for processing read or write requests and at least one slave process for assisting the master process in processing read requests run on the business service platform.
在本申请实施例中,业务服务平台在接收到客户端的数据处理请求之后,可以结合数据处理请求的类型以及主进程与从进程之间数据的同步状况,合理的将数据处理请求分配给主进程或者从进程,以在保证数据处理请求的处理效率的同时,减少数据读取错误或者读取异常。In the embodiment of the present application, after receiving the data processing request from the client, the business service platform can reasonably allocate the data processing request to the master process in combination with the type of the data processing request and the data synchronization status between the master process and the slave process Or from the process, to reduce data read errors or read exceptions while ensuring the processing efficiency of data processing requests.
在一种可能的实现方式中,业务服务平台还运行有路由进程,该路由进程为独立于该主进程和从进程的进程,其负责管理主进程和从进程,并为主进程和从进程分配读请求或者写请求。In a possible implementation manner, the business service platform also runs a routing process, and the routing process is a process independent of the master process and the slave process, which is responsible for managing the master process and the slave process, and assigns the master process and the slave process. read request or write request.
其中,在业务服务平台包括多台服务器的情况下,路由进程、主进程和至少一个从进程可以运行于同一台服务器,也可以是运行于不同的服务器。Wherein, when the business service platform includes multiple servers, the routing process, the master process and at least one slave process may run on the same server, or may run on different servers.
可选的,为了提高容灾性(如,避免出现单台服务器故障而同时影响到主进程和从进程中的多个进程等),或者为了保证各个进程的运行性能,该路由进程、主进程和各个从进程可以分别运行于不同的服务器上。Optionally, in order to improve disaster tolerance (for example, to avoid a single server failure that affects multiple processes in the master process and slave process at the same time, etc.), or to ensure the running performance of each process, the routing process, the master process And each slave process can run on different servers respectively.
为了便于理解,下面以业务服务平台为云平台为例,以本申请的方案所适用的一种场景进行说明,如图1所示。For ease of understanding, the following takes the business service platform as a cloud platform as an example to illustrate a scenario to which the solution of the present application is applicable, as shown in FIG. 1 .
由图1可以看出,该场景包括:云平台10,云平台可以包括多个云服务器101。As can be seen from FIG. 1 , the scenario includes: a
其中,云平台也称为云计算平台,其基于云技术构建出的网络平台。其中,云技术(Cloud technology)是指在广域网或局域网内将硬件、软件、网络等系列资源统一起来,实现数据的计算、储存、处理和共享的一种托管技术。Among them, a cloud platform is also called a cloud computing platform, which is a network platform constructed based on cloud technology. Among them, cloud technology refers to a kind of hosting technology that unifies a series of resources such as hardware, software, and network in a wide area network or a local area network to realize the calculation, storage, processing and sharing of data.
云技术(Cloud technology)是基于云计算商业模式应用的网络技术、信息技术、整合技术、管理平台技术、应用技术等的总称,可以组成资源池,按需所用,灵活便利。技术网络系统的后台服务需要大量的计算、存储资源,如图像存储以及编码等等。伴随着互联网行业的高度发展和应用,将来每个物品都有可能存在自己的识别标志,都需要传输到后台系统进行逻辑处理,不同程度级别的数据将会分开处理,各类行业数据皆需要强大的系统后盾支撑,只能通过云计算来实现。Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology based on cloud computing business models. Background services of technical network systems require a lot of computing and storage resources, such as image storage and encoding. With the high development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the back-end system for logical processing. Data of different levels will be processed separately, and all kinds of industry data need to be strong. The system backing support can only be achieved through cloud computing.
其中,云计算(cloud computing)是一种计算模式,它将计算任务分布在大量计算机构成的资源池上,使各种应用系统能够根据需要获取计算力、存储空间和信息服务。提供资源的网络被称为“云”。“云”中的资源在使用者看来是可以无限扩展的,并且可以随时获取,按需使用,随时扩展,按使用付费。Among them, cloud computing is a computing mode that distributes computing tasks on a resource pool composed of a large number of computers, so that various application systems can obtain computing power, storage space and information services as needed. The network that provides the resources is called the "cloud". The resources in the "cloud" are infinitely expandable in the eyes of users, and can be obtained at any time, used on demand, expanded at any time, and paid for according to usage.
作为云计算的基础能力提供商,会建立云计算资源池(简称云平台,一般称为IaaS(Infrastructure as a Service,基础设施即服务)平台,在资源池中部署多种类型的虚拟资源,供外部客户选择使用。云计算资源池中主要包括:计算设备(为虚拟化机器,包含操作系统)、存储设备、网络设备。As a basic capability provider of cloud computing, it will establish a cloud computing resource pool (referred to as cloud platform, generally called IaaS (Infrastructure as a Service) platform, and deploy various types of virtual resources in the resource pool for External customers choose to use. The cloud computing resource pool mainly includes: computing devices (which are virtualized machines, including operating systems), storage devices, and network devices.
如图1所示,云平台10上运行有主进程和至少一个从进程。另外,该云平台上还运行有主进程和从进程之外的路由进程。其中,主进程、路由进程和至少一个从进程可以分别运行于云平台的不同云服务器上。As shown in FIG. 1 , a master process and at least one slave process run on the
在图1中场景中还包括至少一个客户端20,客户端可以向云平台发送数据处理请求,该数据处理请求可以为写请求或者读请求。The scenario in FIG. 1 also includes at least one
相应的,云平台通过路由进程响应该数据处理请求,并从主进程和从进程中确定处理该数据处理请求的进程。Correspondingly, the cloud platform responds to the data processing request through the routing process, and determines the process for processing the data processing request from the master process and the slave process.
可以理解的是,图1是以业务服务平台为云平台为例说明,在实际应用中,对于业务服务平台为服务器集群或者其他情况也类似,在此不再赘述。It can be understood that FIG. 1 takes the business service platform as a cloud platform as an example for illustration. In practical applications, the business service platform is a server cluster or other situations are similar, and details are not repeated here.
结合以上内容,下面结合流程图对本申请的图像处理方法进行介绍。In combination with the above content, the image processing method of the present application will be introduced below in combination with the flowchart.
如图2所示,其示出了一种数据处理方法一个实施例的流程示意图,本实施例的方法可以应用于业务服务平台,如,具体可以由业务服务平台的路由进程执行。由前面可知,该业务服务平台运行有主进程和至少一个从进程。As shown in FIG. 2 , which shows a schematic flowchart of an embodiment of a data processing method, the method of this embodiment can be applied to a business service platform, for example, it can be specifically executed by a routing process of the business service platform. As can be seen from the foregoing, the business service platform runs with a master process and at least one slave process.
本实施例的方法可以包括:The method of this embodiment may include:
S201,获得客户端发送的数据处理请求。S201, a data processing request sent by a client is obtained.
其中,该数据处理请求可以包括写请求和读请求中的一种或者两种。其中,写请求用于请求写入数据;读请求用于请求读取数据。可以理解的是,在大部分业务场景中,数据处理请求一般为写请求和读请求中的一种。The data processing request may include one or both of a write request and a read request. Among them, the write request is used to request to write data; the read request is used to request to read data. It is understandable that in most business scenarios, the data processing request is generally one of a write request and a read request.
S202,在该数据处理请求包括读请求的情况下,确定该读请求所请求读取的数据的第一数据标识。S202, in the case that the data processing request includes a read request, determine a first data identifier of the data requested by the read request.
可以理解的是,读请求和写请求会有不同的标识方式,因此,通过解析该数据处理请求可以分析出该数据处理请求是否包括读请求。It can be understood that a read request and a write request will have different identification methods. Therefore, by analyzing the data processing request, it can be analyzed whether the data processing request includes a read request.
其中,数据的数据标识用于唯一标识该数据。其中,在不同的业务场景中,唯一标识数据的数据标识的具体形式或者组成结构也会有所差别,具体可以根据需要设定。The data identifier of the data is used to uniquely identify the data. Among them, in different business scenarios, the specific form or composition structure of the data identifier that uniquely identifies the data will also be different, which can be set as required.
如,以业务场景为游戏场景为例,可以通过数据的数据种类和编号来唯一标识一个数据。例如,以帮派游戏场景为例,在帮派游戏中多个玩家组成的组织可以称为一个帮派,因此,对于任意一个帮派所产生的游戏数据,均可以通过帮派数据种类和帮派内标识唯一标识。For example, taking the business scenario as a game scenario as an example, a piece of data can be uniquely identified by the data type and serial number of the data. For example, taking a gang game scene as an example, an organization composed of multiple players in a gang game can be called a gang. Therefore, the game data generated by any gang can be uniquely identified by the gang data type and the gang identity.
在本申请实施例中,为了便于区分,将读请求所请求的数据对应的数据标识称为第一数据标识。In this embodiment of the present application, for the convenience of distinction, the data identifier corresponding to the data requested by the read request is referred to as the first data identifier.
可以理解的是,为了使得业务服务平台可以确认读请求所请求读取的数据,读请求中会包含或者携带用于表征该数据的数据标识的相关信息,因此,通过解析读请求,可以解析出用于表征待读取的数据的第一数据标识。It is understandable that, in order for the business service platform to confirm the data requested by the read request, the read request will contain or carry the relevant information of the data identifier used to represent the data. Therefore, by parsing the read request, it can be parsed out. A first data identifier used to characterize the data to be read.
S203,如该第一数据标识属于缓存的未同步记录中的数据标识,将该读请求转发给该主进程处理。S203, if the first data identifier belongs to a data identifier in a cached unsynchronized record, forward the read request to the main process for processing.
其中,该未同步记录中记录有尚未从主进程同步到从进程的数据对应的数据标识。Wherein, the unsynchronized record records the data identifier corresponding to the data that has not been synchronized from the master process to the slave process.
其中,未同步记录以及未同步记录中记录数据标识的具体形式可以不加限制。如,未同步记录中可以直接存储数据标识;又如,未同步记录可以包括不同数据标识对应的记录,每条数据标识对应的记录中不仅包括该数据标识,还可以包括客户端请求写入该数据标识对应的数据的时刻,还可以根据需要记录与该数据标识相关的其他数据。The specific forms of the unsynchronized records and the record data identifiers in the unsynchronized records may not be limited. For example, an unsynchronized record can directly store data identifiers; for another example, an unsynchronized record can include records corresponding to different data identifiers, and the records corresponding to each data identifier include not only the data identifier, but also the client request to write the data identifier. At the time of the data corresponding to the data identifier, other data related to the data identifier may also be recorded as required.
其中,业务服务平台可以在固定的缓存空间缓存该未同步进程,如,在业务服务平台通过路由进程来管理主进程和从进程的情况下,可以在路由进程对应的内存空间缓存该未同步记录。The business service platform may cache the unsynchronized process in a fixed cache space. For example, if the business service platform manages the master process and the slave process through the routing process, the unsynchronized record may be cached in the memory space corresponding to the routing process. .
其中,业务服务平台确定未同步记录的方式可以有多种,为了便于理解,以几种可能的情况进行介绍。Among them, there are many ways for the business service platform to determine the unsynchronized records. For ease of understanding, several possible situations are introduced.
在一种可能的情况中,业务服务平台可以按照轮询周期或者不定时的从主进程查询尚未同步到从进程的数据的数据标识。相应的,业务服务平台可以将尚未从主进程同步到从进程的数据对应的数据标识记录到未同步记录中;或者,基于查询到的数据标识,更新未同步记录。In a possible situation, the business service platform may query the slave process for the data identifier of the data that has not been synchronized to the slave process according to the polling cycle or irregularly. Correspondingly, the business service platform can record the data identifier corresponding to the data that has not been synchronized from the master process to the slave process into the unsynchronized record; or, based on the queried data identifier, update the unsynchronized record.
但是,该种情况中,需要业务服务平台不断查询主进程向从进程同步数据的情况,可能会增大业务服务平台与主进程之间带宽资源的占用,而且还可能会占用主进程的数据处理资源。However, in this case, the business service platform needs to continuously query the master process to synchronize data with the slave process, which may increase the occupation of bandwidth resources between the business service platform and the master process, and may also occupy the data processing of the master process. resource.
为了减少带宽占用并避免占用主进程的数据处理资源,在又一种可能的情况中,业务服务平台在接收到写请求的情况下,可以确定该写请求所请求写入的数据的第二数据标识,并将该第二数据标识添加到未同步记录中。当然,业务服务平台在将第二数据标识添加到未同步记录的同时或者之后,还会将该写请求转发给主进程处理。In order to reduce bandwidth occupation and avoid occupation of data processing resources of the main process, in another possible situation, when receiving a write request, the business service platform may determine the second data of the data requested to be written by the write request identifier, and the second data identifier is added to the unsynchronized record. Certainly, the business service platform also forwards the write request to the main process for processing while or after adding the second data identifier to the unsynchronized record.
可以理解的是,在业务服务平台接收到写请求时,由于该写请求所请求写入的数据尚未被主进程写入,因此,该第二数据标识对应的数据自然尚未从主进程同步到从进程。可见,在业务服务平台接收到写请求后,便可以将写请求所请求写入的数据确定为尚未从主进程同步到从进程的数据,并将该写请求中的第二数据标识存储到未同步记录,从而无需再向主进程查询尚未同步的数据对应的数据标识。It can be understood that when the business service platform receives the write request, since the data requested by the write request has not been written by the master process, the data corresponding to the second data identifier has not been synchronized from the master process to the slave process. process. It can be seen that after the business service platform receives the write request, it can determine the data requested by the write request to be the data that has not been synchronized from the master process to the slave process, and store the second data identifier in the write request to the unsynchronized data. Synchronize records, so that there is no need to query the main process for the data identifier corresponding to the data that has not been synchronized.
以上是以业务服务平台生成未同步记录的两种方式为例,对于其他可能确定尚未完成同步的数据对应的数据标识的方式也同样适用于本实施例,对此不加限制。The above is an example of the two manners in which the business service platform generates unsynchronized records, and other manners that may determine the data identifier corresponding to the data that has not yet been synchronized are also applicable to this embodiment, which is not limited.
可以理解的是,本申请为了保证主进程尚未向从进程同步的数据与业务服务平台缓存的未同步记录中记录的数据标识所表征的数据一致,业务服务平台还可以不断对未同步记录进行更新,以删除该未同步记录中以完成同步的数据标识。It can be understood that, in order to ensure that the data that the master process has not synchronized to the slave process is consistent with the data represented by the data identifier recorded in the unsynchronized records cached by the business service platform, the business service platform can also continuously update the unsynchronized records. , to delete the data ID in the unsynchronized record to complete the synchronization.
如,在一种可能的实现方式中,业务服务平台可以周期性的向主进程发送已同步信息请求,该已同步信息请求用于请求主进程反馈当前周期内已完成同步到从进程的数据对应的数据标识。其中,主进程在向从进程成功同步数据之后,会存储已同步的数据对应的数据标识。相应的,在该主进程接收到该已同步信息请求之后,主进程将最近一个周期内已同步的数据对应的数据标识的信息发送给业务服务平台。在此基础上,业务服务平台基于主进程反馈的数据标识的信息,删除未同步记录中相应的数据标识。For example, in a possible implementation manner, the business service platform may periodically send a synchronized information request to the master process, and the synchronized information request is used to request the master process to feed back the corresponding data that has been synchronized to the slave process in the current cycle data identification. Among them, after the master process successfully synchronizes data to the slave process, it will store the data identifier corresponding to the synchronized data. Correspondingly, after the main process receives the synchronized information request, the main process sends the information of the data identifier corresponding to the synchronized data in the latest cycle to the business service platform. On this basis, the business service platform deletes the corresponding data identifiers in the unsynchronized records based on the data identifier information fed back by the main process.
该种实现方式实际上是业务服务平台周期性更新未同步记录,因此,可能会存在未同步记录更新不及时的情况,从而导致某个数据已经由主进程同步到从进程,但是业务服务平台的未同步记录中仍表明该数据尚未被同步到从进程,进而仍将对该数据的读请求转发给主进程处理,使得主进程处理的读请求的数量相对较大。This implementation method is actually that the business service platform periodically updates the unsynchronized records. Therefore, there may be cases where the unsynchronized records are not updated in a timely manner, resulting in a certain data has been synchronized from the master process to the slave process, but the business service platform The unsynchronized record still indicates that the data has not been synchronized to the slave process, so the read request for the data is still forwarded to the master process for processing, so that the number of read requests processed by the master process is relatively large.
为了能够最大限度的减少主进程所处理的读请求的数量,最大限度的降低主进程的压力,以进一步提高数据处理请求的处理效率,减少客户端数据处理请求的时延,本申请还可以在主进程将数据同步到从进程之后,主动向业务服务平台上报已同步的数据对应的数据标识。In order to minimize the number of read requests handled by the main process, minimize the pressure on the main process, further improve the processing efficiency of data processing requests, and reduce the delay of client data processing requests, the application can also After the master process synchronizes the data to the slave process, it actively reports the data identifier corresponding to the synchronized data to the business service platform.
具体的,业务服务平台可以获得主进程反馈的同步完成指示。其中,同步完成指示携带有第三数据标识,且该同步完成指示用于表征主进程已将该第三数据标识表示的数据同步到从进程。Specifically, the business service platform can obtain the synchronization completion indication fed back by the main process. The synchronization completion indication carries a third data identifier, and the synchronization completion indication is used to indicate that the master process has synchronized the data represented by the third data identifier to the slave process.
其中,该同步完成指示为主进程确认将第三数据标识的数据已同步到从进程之后生成的。可以理解的是,为了便于区分,将主进程已同步到从进程的数据对应的数据标识称为第三数据标识。相应的,业务服务平台可以基于该同步完成指示,删除未同步记录中的该第三数据标识。The synchronization completion indication is generated after the master process confirms that the data identified by the third data has been synchronized to the slave process. It can be understood that, for the convenience of distinction, the data identifier corresponding to the data that the master process has synchronized to the slave process is referred to as the third data identifier. Correspondingly, the business service platform may delete the third data identifier in the unsynchronized record based on the synchronization completion indication.
在第二种更新未同步记录的方式中,主进程每次完成向从进程同步数据便会通知业务服务平台,从而基于未同步记录确定出的尚未完成同步的数据与主进程中尚未向从进程同步的数据一致,从而可以有利于将所有已完成同步的数据对应的读请求都转发给从进程处理,最大程度的减少了主进程所需处理的读请求的数量,降低了主进程的数据处理压力。In the second method of updating unsynchronized records, each time the master process finishes synchronizing data to the slave process, it will notify the business service platform, so that the unsynchronized data determined based on the unsynchronized records and the master process that has not yet been sent to the slave process The synchronized data is consistent, which is beneficial to forward all read requests corresponding to the synchronized data to the slave process for processing, which minimizes the number of read requests that the master process needs to process and reduces the data processing of the master process. pressure.
可以理解的是,如果未同步记录中存在某个数据的数据标识,则说明该数据尚未从主进程同步到从进程,即,该数据仅仅缓存在主进程对应的内存空间中。因此,在读请求中携带的第一数据标识属于未同步记录中的数据标识的情况下,为了避免由于主进程和从进程中第一数据标识表征的数据的不一致,而导致数据读写错误或者异常,则会将该读请求分配给主进程处理。It can be understood that if there is a data identifier of a certain data in the unsynchronized record, it means that the data has not been synchronized from the master process to the slave process, that is, the data is only cached in the memory space corresponding to the master process. Therefore, in the case where the first data identifier carried in the read request belongs to the data identifier in the unsynchronized record, in order to avoid data read and write errors or exceptions due to inconsistencies in the data represented by the first data identifier in the master process and the slave process , the read request will be assigned to the main process for processing.
S204,如该第一数据标识不属于未同步记录中的数据标识,将该读请求转发给该从进程处理。S204, if the first data identifier does not belong to the data identifier in the unsynchronized record, forward the read request to the slave process for processing.
可以理解的是,如果读请求所请求读取的数据的第一数据标识不属于未同步记录,那么可以确定该数据已经从主进程同步到从进程,因此,为了避免增加主进程的压力,可以将该读请求发送给从进程处理。而且,由于主进程和从进程中该数据已完成同步,不会出现由于主进程和从进程中该数据的不一致而导致数据读取错误或者异常。It can be understood that if the first data identifier of the data requested by the read request does not belong to the unsynchronized record, it can be determined that the data has been synchronized from the master process to the slave process. Therefore, in order to avoid increasing the pressure on the master process, you can Send the read request to the slave process for processing. Moreover, since the data in the master process and the slave process have been synchronized, there will be no data read error or exception due to inconsistency of the data in the master process and the slave process.
可以理解的是,在业务服务平台运行有多个从进程的情况下,业务服务平台可以从多个从进程中选择一个从进程,并将读请求转发给选择出该从进程。其中,业务服务器平台选择用于处理该读请求的从进程的方式有多种,如,可以基于从进程的负载状况选择负载较小的从进程来处理该读请求等,对此不加限制。It can be understood that, when the business service platform runs multiple slave processes, the business service platform can select one slave process from the multiple slave processes, and forward the read request to the selected slave process. There are various ways for the service server platform to select the slave process for processing the read request. For example, a slave process with a smaller load can be selected to process the read request based on the load status of the slave process, which is not limited.
可见,由于本申请业务服务平台缓存有未同步记录,该未同步记录中存储有尚未完成从主进程同步到从进程的数据对应的数据标识。基于此,本申请在接收到客户端的读请求之后,只有在该未同步记录不包括该读请求所请求的数据标识,即确认读请求所请求的数据已经由主进程同步到从进程的情况下,才会将该读请求转发给从进程处理;而如果未同步记录中包括该读请求所请求的数据标识,仍会将该读请求转发给主进程处理,从而在最大限度减少的主进程处理的读请求数量的前提下,降低了由于主进程与从进程之间数据不一致而导致的数据读取错误或异常,进而实现了在提高请求处理效率的同时,减少数据读取错误或者异常的情况。It can be seen that since the business service platform of the present application caches an unsynchronized record, the unsynchronized record stores the data identifier corresponding to the data that has not been synchronized from the master process to the slave process. Based on this, after the application receives the read request from the client, only if the unsynchronized record does not include the data identifier requested by the read request, that is, it is confirmed that the data requested by the read request has been synchronized by the master process to the slave process. , the read request will be forwarded to the slave process for processing; and if the unsynchronized record includes the data identifier requested by the read request, the read request will still be forwarded to the master process for processing, thus minimizing the amount of time the master process handles. Under the premise of increasing the number of read requests, the data read errors or exceptions caused by data inconsistency between the master process and the slave process are reduced, thereby improving the request processing efficiency and reducing data read errors or exceptions. .
为了便于理解,下面以业务服务平台运行有路由进程,并通过路由进程向主进程和从进程调度数据处理请求为例说明。For ease of understanding, the following is an example of a business service platform running a routing process, and scheduling data processing requests to the master process and the slave process through the routing process.
如图3所示,其示出了本申请的数据处理方法的一种实现原理示框架意图。As shown in FIG. 3 , it shows a schematic frame diagram of an implementation principle of the data processing method of the present application.
在图3中业务服务平台300运行有路由进程301、主进程302和至少一个从进程303。In FIG. 3 , the business service platform 300 runs a routing process 301 , a master process 302 and at least one slave process 303 .
如图3所示路由进程中缓存有未同步记录。As shown in Figure 3, there are unsynchronized records cached in the routing process.
其中,客户端310向业务服务平台发送读请求或者写请求后,业务服务平台的路由进程会获得客户端发送的读请求或者写请求。Wherein, after the client 310 sends the read request or the write request to the business service platform, the routing process of the business service platform will obtain the read request or the write request sent by the client.
其中,对于获得的写请求,路由进程301可以直接将写请求发送给主进程。Wherein, for the obtained write request, the routing process 301 may directly send the write request to the main process.
对于获得的读请求,路由进程会检测是否命中缓存的未同步记录,即读请求携带的数据标识是否属于未同步记录中的数据标识。相应的,路由进程会将未命中未同步记录的读请求发送给从进程;如果读请求命中该未同步记录,则会将该读请求发送给主进程处理。For the obtained read request, the routing process will detect whether the cached unsynchronized record is hit, that is, whether the data identifier carried in the read request belongs to the data identifier in the unsynchronized record. Correspondingly, the routing process will send the read request that misses the unsynchronized record to the slave process; if the read request hits the unsynchronized record, it will send the read request to the master process for processing.
下面在图3的原理框架图的基础上,结合图4,从路由进程、主进程和从进程之间的交互流程对本申请的数据处理方法进行详细介绍。The data processing method of the present application will be described in detail below on the basis of the principle frame diagram of FIG.
如图4所示的数据处理方法可以包括:The data processing method shown in Figure 4 may include:
S401,客户端向业务服务平台发送的读请求,以使得路由进程获得读请求。S401, the client sends a read request to the business service platform, so that the routing process obtains the read request.
可以理解的是,在本实施例,以客户端向业务服务平台发送数据处理请求可以为读请求或者写请求中的一种。如果客户端向业务服务平台发送的数据处理请求包括读请求和写请求,那么路由进程可以分离出这两种请求,并分别针对读请求和写请求进行相应处理即可。It can be understood that, in this embodiment, the data processing request sent by the client to the business service platform may be either a read request or a write request. If the data processing request sent by the client to the business service platform includes a read request and a write request, the routing process can separate these two requests and perform corresponding processing on the read request and the write request respectively.
S402,路由进程获得读请求所携带的第一数据标识。S402, the routing process obtains the first data identifier carried in the read request.
其中,该第一数据标识用于表征读请求所请求读取的数据。Wherein, the first data identifier is used to represent the data requested to be read by the read request.
S403,如路由进程确认该第一数据标识属于缓存的未同步记录中的数据标识,路由进程将该读请求转发给该主进程处理。S403, if the routing process confirms that the first data identifier belongs to the data identifier in the cached unsynchronized record, the routing process forwards the read request to the main process for processing.
可以理解的是,主进程在接收到该读请求之后,可以基于该读请求从缓存的业务数据中查询相应的数据,然后将查询到的数据返回给客户端。对于主进程基于读请求向客户端返回相应数据的具体实现不加限制,在图4中也未示出该部分内容。It can be understood that after receiving the read request, the main process can query corresponding data from the cached service data based on the read request, and then return the queried data to the client. There is no restriction on the specific implementation of the main process returning corresponding data to the client based on the read request, and this part of the content is not shown in FIG. 4 .
S404,如路由进程确认该第一数据标识不属于缓存的未同步记录中的数据标识,路由进程从至少一个从进程中选择用于处理该读请求的从进程,并将该读请求转发给选择出的该从进程。S404, if the routing process confirms that the first data identifier does not belong to the data identifier in the cached unsynchronized record, the routing process selects a slave process for processing the read request from at least one slave process, and forwards the read request to the selected slave process out of the slave process.
与主进程处理读请求类似,由于从进程也缓存有主进程同步的各个数据,因此,从进程可以响应该读请求,从缓存的数据中查询出该读请求对应的数据,并将查询到的数据返回给该客户端。Similar to the master process processing read requests, since the slave process also caches various data synchronized by the master process, the slave process can respond to the read request, query the data corresponding to the read request from the cached data, and send the queried data. Data is returned to the client.
S405,客户端向业务服务平台发送写请求,以使得路由进程获得客户端发送的写请求。S405, the client sends a write request to the business service platform, so that the routing process obtains the write request sent by the client.
S406,路由进程确认该写请求所请求写入的数据的第二数据标识,并将第二数据标识添加到缓存的未同步记录中。S406, the routing process confirms the second data identifier of the data requested to be written by the write request, and adds the second data identifier to the unsynchronized record in the cache.
可以理解的是,在写请求转发到主进程之前,主进程尚未写入该写请求对应的数据,因此,该数据自然不属于已同步到从进程的数据,因此,路由进程可以确定该数据为尚未由主进程同步到从进程的数据,从而在未同步记录中存储该数据的第二数据标识。It is understandable that before the write request is forwarded to the master process, the master process has not written the data corresponding to the write request. Therefore, the data naturally does not belong to the data that has been synchronized to the slave process. Therefore, the routing process can determine that the data is Data that has not been synchronized by the master process to the slave process, so that the second data identifier of the data is stored in the unsynchronized record.
作为一种可选方式,将第二数据标识添加到未同步记录中,可以是生成一条第二数据标识对应的记录。如,在第二数据标识对应的记录中存储有该第二数据标识。其中,第二数据标识对应的记录中还可以存储与第二数据标识相关的其他数据。As an optional manner, adding the second data identifier to the unsynchronized record may be to generate a record corresponding to the second data identifier. For example, the second data identifier is stored in the record corresponding to the second data identifier. The record corresponding to the second data identifier may also store other data related to the second data identifier.
可以理解的是,在本申请以上任意一个实施例中,考虑到业务服务平台中用于缓存未同步记录的空间较为有限,如,业务服务平台分配给路由进程的内存空间有限,因此,如果业务服务平台处理的数据处理请求的数量较多,则该未同步记录中可能需要存储的数据标识的数量也会相对较多。It can be understood that, in any of the above embodiments of the present application, considering that the space for caching unsynchronized records in the business service platform is relatively limited, for example, the memory space allocated by the business service platform to the routing process is limited, therefore, if the business If the number of data processing requests processed by the service platform is large, the number of data identifiers that may need to be stored in the unsynchronized record will also be relatively large.
在该种情况下,本申请在业务服务平台确认缓存空间不足的情况下,还可以删除未同步记录中长期未使用的数据标识。其中,未同步记录中长期未使用的数据标识是指较为时间未被请求读取的数据的数据标识。In this case, when the business service platform confirms that the cache space is insufficient, the application can also delete the long-unused data identifiers in the unsynchronized records. Wherein, the long-term unused data identifier in the unsynchronized record refers to the data identifier of the data that has not been requested to be read for a relatively long time.
具体的,在路由进程获得针对第二数据标识的读请求(即,请求读取该第二数据标识对应数据的读请求)之后,如该第二数据标识属于该未同步记录,则路由进程还会将获得该读请求的时刻确定为该第二数据标识的访问时刻,并在该第二数据标识对应的记录中存储该访问时刻。Specifically, after the routing process obtains a read request for the second data identifier (that is, a read request requesting to read the data corresponding to the second data identifier), if the second data identifier belongs to the unsynchronized record, the routing process also The time when the read request is obtained is determined as the access time of the second data identifier, and the access time is stored in the record corresponding to the second data identifier.
其中,在第二数据标识的记录中存储有访问时刻的情况下,路由进程会利用最近一次确定出的访问时刻对第二数据标识的记录中的访问时刻进行更新,以使得第二数据标识的记录中存储的是该第二数据标识的最近一次的访问时刻。Wherein, in the case where the access time is stored in the record of the second data identifier, the routing process will use the last determined access time to update the access time in the record of the second data identifier, so that the access time of the second data identifier is updated. Stored in the record is the latest access time of the second data identifier.
相应的,如果路由进程在确认缓存空间不足的情况下,可以删除未同步记录中访问时刻距离当前时刻的时长较长的至少一个数据标识的记录。如,删除访问时刻距离当前时刻超过设定时长的各个数据标识的记录,或者是,删除访问时刻距离当前时刻最长的一个或者多个数据标识的记录。Correspondingly, if the routing process confirms that the cache space is insufficient, it can delete at least one data identifier record whose access time is longer from the current time in the unsynchronized records. For example, delete the records of each data identifier whose access time is longer than the current time, or delete the records of one or more data identifiers whose access time is the longest from the current time.
S407,路由进程将该写请求转发给该主进程处理。S407, the routing process forwards the write request to the main process for processing.
需要说明的是,将第二数据标识添加到缓存的未同步记录与将写请求转发给主进程这两个步骤的先后顺序并不限定,如,这两个步骤也可以同时执行。It should be noted that the sequence of the two steps of adding the second data identifier to the cached unsynchronized record and forwarding the write request to the main process is not limited, for example, these two steps may also be performed simultaneously.
S408,主进程基于写请求执行数据写操作,缓存写操作结果。S408, the main process performs a data write operation based on the write request, and caches the write operation result.
主进程响应于写请求执行写操作,从而实现缓存写操作相应的数据。The main process executes the write operation in response to the write request, thereby implementing the cache of the data corresponding to the write operation.
S409,主进程向各从进程发送已写入且尚未同步的至少一个数据。S409, the master process sends at least one piece of data that has been written but not yet synchronized to each slave process.
其中,主进程向从进程发送需要同步的数据的具体方式可以不加限制。如,主进程可以在执行完写请求对应的写操作之后,将写入的数据发送给各从进程,以将该数据的同步到从进程。又如,为了避免频繁同步数据而占用过多主进程的处理资源,主进程还可以定期(如按照设定的时间间隔或者周期等)向主进程发送数据同步指示,数据同步指示可以携带该主进程已写入到主进程的缓存空间但未同步给从进程的所有数据。当然,主进程还可以有其他与从进程同步数据的方式,在此不再赘述。The specific manner in which the master process sends the data that needs to be synchronized to the slave process may not be limited. For example, the master process may send the written data to each slave process after performing the write operation corresponding to the write request, so as to synchronize the data to the slave process. For another example, in order to avoid frequently synchronizing data and occupying too many processing resources of the main process, the main process can also periodically (such as according to a set time interval or period, etc.) send a data synchronization instruction to the main process, and the data synchronization instruction can carry the main process. All data that the process has written to the cache space of the master process but not synchronized to the slave process. Of course, the master process may also have other ways of synchronizing data with the slave process, which will not be repeated here.
S410,主进程在确认该至少一个数据成功同步到从进程后,确认成功同步的至少一个数据各自的第三数据标识,并向路由进程反馈该至少一个数据对应的同步完成指示。S410: After confirming that the at least one piece of data is successfully synchronized to the slave process, the master process confirms the respective third data identifiers of the at least one piece of data successfully synchronized, and feeds back a synchronization completion indication corresponding to the at least one piece of data to the routing process.
其中,主进程确认数据是否成功同步的从进程的方式也可以有多种。如,从进程基于主进程发送的数据完成数据同步后,可以向主进程反馈成功指示,成功指示表征从进程完成相应数据的同步。如,成功指示携带同步成功的数据的数据标识。当然,主进程可以主动去从进程查询同步状态,以检测数据同步是否成功。Among them, there may also be various ways for the master process to confirm whether the data is successfully synchronized with the slave process. For example, after the slave process completes data synchronization based on the data sent by the master process, it can feed back a success indication to the master process, and the success indication indicates that the slave process has completed synchronization of corresponding data. For example, the success indication carries the data identifier of the data whose synchronization is successful. Of course, the master process can actively query the synchronization status of the slave process to detect whether the data synchronization is successful.
S411,路由进程基于同步完成指示携带的至少一个第三数据标识,删除未同步记录中该至少一个第三数据标识。S411, the routing process deletes the at least one third data identifier in the unsynchronized record based on the at least one third data identifier carried in the synchronization completion indication.
路由进程在获得主进程反馈的同步完成指示后,可以确定同步完成指示携带有第三数据标识所表征的数据已完成数据同步,在此基础上,可以将该第三数据标识从未同步记录删除。相应的,后续接收到携带该第三数据标识的读请求之后,便可以将该读请求转发给从进程处理。After obtaining the synchronization completion instruction fed back by the main process, the routing process can determine that the synchronization completion instruction carries the data represented by the third data identifier and has completed data synchronization. On this basis, the third data identifier can be deleted from the unsynchronized record. . Correspondingly, after subsequently receiving the read request carrying the third data identifier, the read request can be forwarded to the slave process for processing.
可以理解的是,如果业务服务平台中的主进程出现故障,则可能会影响到业务服务平台对于客户端读写请求的处理,因此,在确定出主进程出现故障之后,还需要有相应的恢复机制。然而,如果直接重启主进程,则复杂度高,耗时较长。为了解决该问题,本申请的业务服务平台在确定出主进程出现故障之后,还会再多个从进程中重新选取一个从进程作为主进程。It is understandable that if the main process in the business service platform fails, it may affect the business service platform's processing of client read and write requests. Therefore, after it is determined that the main process is faulty, corresponding recovery is required. mechanism. However, if the main process is restarted directly, it will be complicated and time consuming. In order to solve this problem, after it is determined that the master process is faulty, the business service platform of the present application will reselect a slave process as the master process from multiple slave processes.
如图5所示,其示出了本申请路由进程从多个从进程中选择主进程的一种流程示意图,本实施例可以包括:As shown in FIG. 5, it shows a schematic flowchart of the routing process of the present application selecting a master process from multiple slave processes. This embodiment may include:
S501,在超过设定时长未检测到主进程发送的心跳包的情况下,路由进程查询各从进程中存储的同步序号。S501 , in the case that the heartbeat packet sent by the master process is not detected for a set period of time, the routing process queries the synchronization sequence numbers stored in each slave process.
其中,主进程可以按照设定的第一心跳周期向路由进程发送心跳包。相应的,从进程可以按照设定的第二心跳周期向路由进程发送心跳包。其中,第一心跳周期和第二心跳周期可以相同,也可以不同。The main process may send a heartbeat packet to the routing process according to the set first heartbeat cycle. Correspondingly, the slave process may send a heartbeat packet to the routing process according to the set second heartbeat period. The first heartbeat period and the second heartbeat period may be the same or different.
如,主进程或者从进程可以按照各自对应的心跳周期,在到达心跳发送时刻时,向业务服务平台发送心跳包。For example, the master process or the slave process can send a heartbeat packet to the business service platform according to the corresponding heartbeat cycle when the heartbeat sending time is reached.
可以理解的是,由于主进程和从进程都定期向路由进程发送心跳包,因此,路由进程可以基于主进程发送的心跳包的情况,来分析主进程是否存在异常;相应的,路由进程还可以基于从进程发送的心跳包的情况,来分析从进程是否存在异常。It is understandable that since both the master process and the slave process periodically send heartbeat packets to the routing process, the routing process can analyze whether there is an abnormality in the master process based on the heartbeat packets sent by the master process; correspondingly, the routing process can also Based on the heartbeat packets sent by the slave process, analyze whether there is an abnormality in the slave process.
如路由进程超过设定时长未收到主进程的心跳包,则该路由进程确认该主进程出现故障。If the routing process does not receive the heartbeat packet of the main process for a set period of time, the routing process confirms that the main process is faulty.
可以理解的是,本实施例是以基于主进程向路由进程发送心跳包的情况来分析主进程是否存在故障。但是可以理解的是,在实际应用中,路由进程也可以通过其他方式来发现主进程的故障,如,路由进程可以定期向主进程发送检测包,如果超过设定时长未收到主进程针对该检测包的反馈,或者连续多个检测报告均为收到反馈,则确认主进程存在故障。It can be understood that, in this embodiment, whether the main process is faulty is analyzed based on the fact that the main process sends a heartbeat packet to the routing process. However, it is understandable that in practical applications, the routing process can also find the fault of the main process in other ways. For example, the routing process can periodically send detection packets to the main process. If the feedback of the detection packet, or the feedback of multiple consecutive detection reports is received, it is confirmed that the main process is faulty.
其中,该同步序号表征主进程向从进程同步数据的总数量。其中,主进程向从进程同步数据的总数量也可以认为是主进程向多个从进程发起同步数据的总轮数。其中,每轮数据同步对应主进程针对一个待同步的数据向多个从进程发起的一轮数据同步指示。The synchronization sequence number represents the total amount of data synchronized from the master process to the slave process. The total number of synchronization data from the master process to the slave processes may also be considered as the total number of rounds of synchronization data initiated by the master process to multiple slave processes. Wherein, each round of data synchronization corresponds to a round of data synchronization instructions initiated by the master process to multiple slave processes for one data to be synchronized.
在一种可能的实现方式中,主进程每次向从进程同步数据之前,都会更新该同步序号,以使得该同步序号所表征的主进程向从进程同步数据的总数量增大。如,同步序号可以为主进程向从进程同步数据的数量值,则每次更新该同步序号就是将该数量值加一。相应的,主进程每次可以将待同步的数据和最新更新的该同步序号一并发送给各从进程,以使得从进程存储该同步序号。In a possible implementation manner, each time the master process synchronizes data with the slave process, the synchronization sequence number will be updated, so that the total amount of synchronization data from the master process to the slave process represented by the synchronization sequence number increases. For example, the synchronization sequence number can be the amount of data synchronized from the master process to the slave process, and each time the synchronization sequence number is updated, the amount is incremented by one. Correspondingly, the master process can send the data to be synchronized together with the latest updated synchronization sequence number to each slave process each time, so that the slave process stores the synchronization sequence number.
在又一种可能的实现方式中,主进程每次接收到写请求都会更新同步序号,以使得该同步序号所表征的主进程向从进程同步数据的总数量增大。相应的,主进程向从进程同步数据时,可以将待同步的数据与当前确定出的同步序号一并发送给各从进程。In another possible implementation manner, each time the master process receives a write request, it updates the synchronization sequence number, so that the total amount of synchronization data from the master process to the slave process represented by the synchronization sequence number increases. Correspondingly, when the master process synchronizes data with the slave process, the data to be synchronized may be sent to each slave process together with the currently determined synchronization sequence number.
例如,主进程首次接收到写请求后,可以设置同步序号可以为“0001”,那么主进程完成该写请求的写操作之后,主进程可以将写操作对应的数据以及该同步序号“0001”一并发送给各从进程。而第二次接收到写请求之后,则会将同步序号更改为“0002”,这样,在主进程完成该第二次接收到的写请求的写操作之后,在将数据同步给各从进程的同时,也会将同步序号“0002”发送给各进程。For example, after the main process receives the write request for the first time, the synchronization sequence number can be set to "0001", then after the main process completes the write operation of the write request, the main process can change the data corresponding to the write operation and the synchronization sequence number "0001" to one and sent to each slave process. After receiving the write request for the second time, the synchronization sequence number will be changed to "0002". In this way, after the master process completes the write operation of the write request received for the second time, it will synchronize the data to each slave process. At the same time, the synchronization sequence number "0002" is also sent to each process.
可以理解的是,由于同步序号可以反映出主进程向从进程同步数据的总数量,因此,如果主进程出现故障导致主进程中部分数据只同步给部分从进程,那么根据从进程中存储的同步序号便可以确定哪些从进程中已同步的数据是较为完成的数据。It is understandable that since the synchronization sequence number can reflect the total amount of data synchronized from the master process to the slave process, if the master process fails and some data in the master process is only synchronized to part of the slave processes, then according to the synchronization stored in the slave process The sequence number identifies which slave processes have synchronized data that are more complete.
例如,以上面主进程在第二次向各同步进程发送同步数据的同时,携带了同步序号“0002”,那么如果从进程已经从主进程接收到第二次同步的数据,则从进程中存储的同步序号应该为“0002”。但是,如果从进程存储的同步序号为“0001”,则说明该从进程未完成第二次数据的同步,而获得了主进程第一次同步的数据。For example, when the above master process sends synchronization data to each synchronization process for the second time, it carries the synchronization sequence number "0002", then if the slave process has received the second synchronization data from the master process, it will be stored in the slave process. The synchronization sequence number should be "0002". However, if the synchronization sequence number stored by the slave process is "0001", it means that the slave process has not completed the second data synchronization, but obtained the first synchronization data of the master process.
S502,基于该多个从进程各自存储的同步序号,确定从该主进程获得同步数据的总数量最多的目标从进程。S502: Determine, based on the synchronization sequence numbers stored by the multiple slave processes, the target slave process that obtains the largest total number of synchronization data from the master process.
其中,目标从进程是指多个从进程中存储的同步序号表征的该总数量最大的从进程。可以理解的是,在表征的同步数据的总数量最多的从进程有至少两个的情况下,可以随机选择一个从进程为目标从进程;也可以是根据负载情况,从该至少两个从进程中选择一个目标从进程。The target slave process refers to the slave process with the largest total number represented by the synchronization sequence numbers stored in the multiple slave processes. It can be understood that, in the case where there are at least two slave processes with the largest total number of synchronous data represented, one slave process can be randomly selected as the target slave process; it can also be based on the load situation, from the at least two slave processes. Select a target from the process.
如,上面例子中,存储的同步序号为“0002”的从进程比存储的同步序号为“0001”的从进程从主进程获得同步数据的总数量更多。For example, in the above example, the slave process with the stored synchronization sequence number "0002" obtains more total synchronization data from the master process than the slave process with the stored synchronization sequence number "0001".
S503,将该目标从进程确定为主进程。S503, the target slave process is determined as the master process.
由上面介绍可知,目标从进程中的数据与主进程中数据的一致性最高,因此,将该目标从进程确定新的主进程有利于减少由于数据不一致而导致的数据读取异常。It can be seen from the above introduction that the data in the target slave process has the highest consistency with the data in the master process. Therefore, determining the new master process for the target slave process is beneficial to reduce data read exceptions caused by data inconsistency.
其中,将目标从进程确定为主进程所需要执行的操作可以包括:存储该目标从进程为主进程的信息;还可以包括:向该目标从进程以及其他从进程广播该目标从进程作为主进程的信息。The operations required to determine the target slave process as the master process may include: storing the information of the target slave process as the master process; and may also include: broadcasting the target slave process as the master process to the target slave process and other slave processes Information.
可以理解的是,在目标从进程成为新的主进程之后,该目标从进程可以将自身存储的数据与其他从进程同步,以保证数据一致性。It can be understood that after the target slave process becomes the new master process, the target slave process can synchronize the data stored by itself with other slave processes to ensure data consistency.
为了便于理解,以同步序号为主进程向从进程同步的数据的总数量为例说明,如,参见图6,其示出了路由进程从多个从进程中选择主进程的原理示意图。For ease of understanding, the total number of data synchronized by the master process to the slave process is taken as an example. For example, see FIG. 6 , which shows a schematic diagram of the principle that the routing process selects the master process from multiple slave processes.
在图6中主进程宕机时,该主进程中存储的同步序号为112,则表示主进程已经向从进程同步了112个数据(或者发起了112轮数据同步),但是由于在同步第112个数据的过程中,该主进程宕机,使得只有部分从进程完成了该第112个数据的同步。When the master process is down in Figure 6, the synchronization sequence number stored in the master process is 112, which means that the master process has synchronized 112 pieces of data to the slave process (or initiated 112 rounds of data synchronization), but since the 112th round of data synchronization is synchronized During the process of the 112th data, the master process is down, so that only part of the slave processes complete the synchronization of the 112th data.
如图6中,进程1中的同步序号为112,则说明进程1已经获得主进程向该从进程1同步的第112个数据,而进程2和进程3中同步需要仍为111,因此,进程20由于从进程1中存储的同步序号最大,说明从进程1与发生故障的主进程之间的数据一致性最高,因此,可以将该从进程确定为新的主进程。As shown in Figure 6, the synchronization sequence number in process 1 is 112, which means that process 1 has obtained the 112th data synchronized by the master process to the slave process 1, while the synchronization needs of process 2 and process 3 are still 111. Therefore, the
相应的,该新的主进程可以将自身的数据同步给其他从进程,与保证各个主进程与该新的主进程之间的数据一致性。Correspondingly, the new master process can synchronize its own data to other slave processes to ensure data consistency between each master process and the new master process.
对应本申请的一种数据处理方法,本申请还提供了一种数据处理装置。Corresponding to a data processing method of the present application, the present application also provides a data processing apparatus.
如图7所示,其示出了本申请一种数据处理装置一个实施例的组成结构示意图,本实施例的装置应用于业务服务平台,该业务服务平台运行有主进程和至少一个从进程,该装置包括:As shown in FIG. 7 , it shows a schematic diagram of the composition and structure of an embodiment of a data processing apparatus of the present application. The apparatus of this embodiment is applied to a business service platform, and the business service platform runs a master process and at least one slave process, The device includes:
请求获得单元701,用于获得客户端发送的数据处理请求;A
第一标识确定单元702,用于在该数据处理请求包括读请求的情况下,确定该读请求所请求读取的数据的第一数据标识;A first
第一请求处理单元703,用于如该第一数据标识属于缓存的未同步记录中的数据标识,将该读请求转发给该主进程处理,该未同步记录中记录有尚未从主进程同步到从进程的数据对应的数据标识;The first
第二请求处理单元704,用于如该第一数据标识不属于该未同步记录中的数据标识,将该读请求转发给该从进程处理。The second
在一种可能的实现方式中,该装置还可以包括:In a possible implementation, the apparatus may further include:
第二标识确定单元,用于在该数据处理请求包括写请求的情况下,确定该写请求所请求写入的数据的第二数据标识;a second identification determining unit, configured to determine a second data identification of the data requested to be written by the write request when the data processing request includes a write request;
第三请求处理单元,用于将该写请求转发给该主进程处理,并将该第二数据标识添加到该未同步记录中。A third request processing unit, configured to forward the write request to the main process for processing, and add the second data identifier to the unsynchronized record.
可选的,该装置还包括:Optionally, the device further includes:
指示获得单元,用于获得该主进程反馈的同步完成指示,该同步完成指示携带有第三数据标识,且该同步完成指示用于表征该主进程已将该第三数据标识表示的数据同步到该从进程;The instruction obtaining unit is used to obtain the synchronization completion instruction fed back by the main process, the synchronization completion instruction carries a third data identifier, and the synchronization completion instruction is used to represent that the main process has synchronized the data represented by the third data identifier to the slave process;
标识删除单元,用于删除该未同步记录中的该第三数据标识。An identification deletion unit, configured to delete the third data identification in the unsynchronized record.
可选的,第三请求处理单元在该将该第二数据标识添加到该未同步记录中时,具体用于在该未同步记录中添加该第二数据标识的记录;Optionally, when the second data identifier is added to the unsynchronized record, the third request processing unit is specifically configured to add the record of the second data identifier to the unsynchronized record;
相应的,该装置还可以包括:Correspondingly, the device may also include:
时刻记录单元,用于在获得针对该第二数据标识的读请求之后,将获得该读请求的时刻确定为该第二数据标识的访问时刻,并将该第二数据标识的访问时刻存储到该第二数据标识的记录中;The time recording unit is used to determine the time of obtaining the read request as the access time of the second data flag after obtaining the read request for the second data flag, and store the access time of the second data flag in the in the record of the second data identification;
记录删除单元,用于在缓存空间不足的情况下,基于该未同步记录中各数据标识的添加时刻,删除该未同步记录中该访问时刻距离当前时刻的时长较长的至少一个数据标识的记录。The record deletion unit is used for, in the case of insufficient cache space, based on the addition time of each data mark in this unsynchronized record, to delete the record of at least one data mark whose duration is longer from this access moment from the current moment in this unsynchronized record .
在一种可能的实现方式中,该业务服务平台运行有多个从进程;In a possible implementation manner, the business service platform runs with multiple slave processes;
本申请的该装置还可以包括:The device of the present application may also include:
序号查询单元,用于在确认该主进程出现故障的情况下,查询该多个从进程各自存储的同步序号,其中,该同步序号表征该主进程向从进程同步数据的总数量;a sequence number query unit, configured to query the synchronization sequence numbers stored by the multiple slave processes in the case of confirming that the master process is faulty, wherein the synchronization sequence number represents the total amount of data synchronized from the master process to the slave processes;
进程确定单元,用于基于该多个从进程各自存储的同步序号,确定从该主进程获得同步数据的总数量最多的目标从进程;a process determination unit, configured to determine, based on the synchronization sequence numbers stored by the multiple slave processes, the target slave process that obtains the largest total number of synchronization data from the master process;
主进程替换单元,用于将该目标从进程确定为主进程。The master process replacement unit is used to determine the target slave process as the master process.
可选的,序号查询单元在确认该主进程出现故障时,具体为:在超过设定时长未检测到该主进程发送的心跳包的情况下,确认该主进程出现故障,其中,该主进程按照设定心跳周期,在到达心跳发送时刻时,向业务服务平台发送心跳包。Optionally, when the sequence number query unit confirms that the main process is faulty, it is specifically: in the case that the heartbeat packet sent by the main process is not detected for a set period of time, confirming that the main process is faulty, wherein the main process is faulty. According to the set heartbeat period, when the heartbeat sending time arrives, a heartbeat packet is sent to the business service platform.
又一方面,本申请还提供了一种服务器,该服务器可以为独立的服务器、服务器集群中的服务器或者云平台中的节点等等。如图8,其示出了本申请提供的服务器的一种组成架构示意图。在图8中,该服务器800可以包括:处理器801和存储器802。In another aspect, the present application also provides a server, where the server may be an independent server, a server in a server cluster, or a node in a cloud platform, or the like. FIG. 8 shows a schematic diagram of a composition structure of the server provided by the present application. In FIG. 8 , the
可选的,该服务器还可以包括:通信接口803、输入单元804和显示器805和通信总线806。Optionally, the server may further include: a
其中,处理器801、存储器802、通信接口803、输入单元804和显示器805均通过通信总线806完成相互间的通信。The
在本申请实施例中,该处理器801,可以为中央处理器,特定应用集成电路等。In this embodiment of the present application, the
该处理器可以调用存储器802中存储的程序,具体的,处理器可以执行以上实施例中云服务器侧所执行的操作。The processor may call the program stored in the
存储器802中用于存放一个或者一个以上程序,程序可以包括程序代码,所述程序代码包括计算机操作指令,在本申请实施例中,该存储器中至少存储有用于实现以上任意一个实施例中的数据处理方法的程序。The
在一种可能的实现方式中,该存储器802可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、以上所提到的程序,以及图像播放等功能所需的应用程序等;存储数据区可存储根据服务器的使用过程中所创建的数据。In a possible implementation manner, the
该通信接口803可以为通信模块的接口。The
本申请还可以包括输入单元804,该输入单元可以包括触摸感应单元、键盘等等。The present application may also include an
该显示器805包括显示面板,如触摸显示面板等。The
当然,图8所示的服务器结构并不构成对本申请实施例中服务器的限定,在实际应用中服务器可以包括比图8所示的更多或更少的部件,或者组合某些部件。Of course, the server structure shown in FIG. 8 does not constitute a limitation on the server in this embodiment of the present application. In practical applications, the server may include more or less components than those shown in FIG. 8 , or combine some components.
另一方面,本申请还提供了一种存储介质,该存储介质中存储有计算机可执行指令,所述计算机可执行指令被处理器加载并执行时,实现如上任意一个实施例中的数据处理方法。On the other hand, the present application also provides a storage medium, where computer-executable instructions are stored in the storage medium, and when the computer-executable instructions are loaded and executed by a processor, the data processing method in any of the above embodiments is implemented. .
根据本申请的一个方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行以上数据处理方法任意一个实施例中提供的方法。According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the method provided in any one of the above data processing method embodiments.
需要说明的是,本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。对于装置类实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. For the same and similar parts among the various embodiments, refer to each other Can. As for the apparatus type embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for the relevant part, please refer to the partial description of the method embodiment.
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、物品或者设备中还存在另外的相同要素。Finally, it should also be noted that in this document, relational terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply these entities or that there is any such actual relationship or sequence between operations. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article, or device that includes the element.
对所公开的实施例的上述说明,使本领域技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
以上仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above are only the preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, some improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications should also be regarded as It is the protection scope of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010651605.2A CN111813550B (en) | 2020-07-08 | 2020-07-08 | Data processing method, device, server and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010651605.2A CN111813550B (en) | 2020-07-08 | 2020-07-08 | Data processing method, device, server and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111813550A true CN111813550A (en) | 2020-10-23 |
| CN111813550B CN111813550B (en) | 2025-07-25 |
Family
ID=72842915
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010651605.2A Active CN111813550B (en) | 2020-07-08 | 2020-07-08 | Data processing method, device, server and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111813550B (en) |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112245906A (en) * | 2020-11-18 | 2021-01-22 | 腾讯科技(深圳)有限公司 | Data synchronization method and device, electronic equipment and storage medium |
| CN112765057A (en) * | 2020-12-30 | 2021-05-07 | 京信网络系统股份有限公司 | Data transmission method, PCIE system, equipment and storage medium |
| CN113064748A (en) * | 2021-04-08 | 2021-07-02 | 中国第一汽车股份有限公司 | Process succession method, device, electronic equipment and storage medium |
| CN113360287A (en) * | 2021-06-21 | 2021-09-07 | 上海哔哩哔哩科技有限公司 | Data processing method and device |
| CN114942851A (en) * | 2022-07-25 | 2022-08-26 | 北京优合融宜科技有限公司 | Memory data reading and writing method and reading and writing device |
| CN116010501A (en) * | 2022-12-30 | 2023-04-25 | 百果园技术(新加坡)有限公司 | Distributed medium-level data processing method, system, device, storage medium and program product |
| CN116107517A (en) * | 2023-04-11 | 2023-05-12 | 远江盛邦(北京)网络安全科技股份有限公司 | Data synchronization method, device, electronic equipment and storage medium |
Citations (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6438586B1 (en) * | 1996-09-30 | 2002-08-20 | Emc Corporation | File transfer utility which employs an intermediate data storage system |
| CN102591964A (en) * | 2011-12-30 | 2012-07-18 | 北京新媒传信科技有限公司 | Implementation method and device for data reading-writing splitting system |
| WO2016091069A1 (en) * | 2014-12-12 | 2016-06-16 | 北京奇虎科技有限公司 | Data operation method and device |
| CN107656937A (en) * | 2016-07-26 | 2018-02-02 | 北京京东尚科信息技术有限公司 | Method and apparatus for realizing read-write data consistency |
| US20180341428A1 (en) * | 2017-05-24 | 2018-11-29 | International Business Machines Corporation | Detection of over-access of memory shared among multiple processes |
| CN108920092A (en) * | 2018-05-07 | 2018-11-30 | 北京奇艺世纪科技有限公司 | Data manipulation method, device and the electronic equipment of internal storage data |
| CN110019527A (en) * | 2017-12-20 | 2019-07-16 | 腾讯科技(深圳)有限公司 | From library read method, relevant apparatus and equipment |
| CN110286948A (en) * | 2019-06-27 | 2019-09-27 | 深圳市网心科技有限公司 | Process suspension method and related equipment based on reading and writing of virtual host storage device |
| CN110334145A (en) * | 2018-02-24 | 2019-10-15 | 北京京东尚科信息技术有限公司 | The method and apparatus of data processing |
| CN110781214A (en) * | 2019-09-26 | 2020-02-11 | 金蝶软件(中国)有限公司 | Database reading and writing method and device, computer equipment and storage medium |
-
2020
- 2020-07-08 CN CN202010651605.2A patent/CN111813550B/en active Active
Patent Citations (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6438586B1 (en) * | 1996-09-30 | 2002-08-20 | Emc Corporation | File transfer utility which employs an intermediate data storage system |
| CN102591964A (en) * | 2011-12-30 | 2012-07-18 | 北京新媒传信科技有限公司 | Implementation method and device for data reading-writing splitting system |
| WO2016091069A1 (en) * | 2014-12-12 | 2016-06-16 | 北京奇虎科技有限公司 | Data operation method and device |
| CN107656937A (en) * | 2016-07-26 | 2018-02-02 | 北京京东尚科信息技术有限公司 | Method and apparatus for realizing read-write data consistency |
| US20180341428A1 (en) * | 2017-05-24 | 2018-11-29 | International Business Machines Corporation | Detection of over-access of memory shared among multiple processes |
| CN110019527A (en) * | 2017-12-20 | 2019-07-16 | 腾讯科技(深圳)有限公司 | From library read method, relevant apparatus and equipment |
| CN110334145A (en) * | 2018-02-24 | 2019-10-15 | 北京京东尚科信息技术有限公司 | The method and apparatus of data processing |
| CN108920092A (en) * | 2018-05-07 | 2018-11-30 | 北京奇艺世纪科技有限公司 | Data manipulation method, device and the electronic equipment of internal storage data |
| CN110286948A (en) * | 2019-06-27 | 2019-09-27 | 深圳市网心科技有限公司 | Process suspension method and related equipment based on reading and writing of virtual host storage device |
| CN110781214A (en) * | 2019-09-26 | 2020-02-11 | 金蝶软件(中国)有限公司 | Database reading and writing method and device, computer equipment and storage medium |
Non-Patent Citations (1)
| Title |
|---|
| WEIXIN_34378045: "redis主从架构(实现读写分离)", 《CSDN》, 26 February 2019 (2019-02-26), pages 1 - 3 * |
Cited By (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112245906A (en) * | 2020-11-18 | 2021-01-22 | 腾讯科技(深圳)有限公司 | Data synchronization method and device, electronic equipment and storage medium |
| CN112245906B (en) * | 2020-11-18 | 2023-08-25 | 腾讯科技(深圳)有限公司 | Data synchronization method, device, electronic equipment and storage medium |
| CN112765057A (en) * | 2020-12-30 | 2021-05-07 | 京信网络系统股份有限公司 | Data transmission method, PCIE system, equipment and storage medium |
| CN112765057B (en) * | 2020-12-30 | 2024-04-30 | 京信网络系统股份有限公司 | Data transmission method, PCIE system, device and storage medium |
| WO2022213641A1 (en) * | 2021-04-08 | 2022-10-13 | 中国第一汽车股份有限公司 | Method and apparatus for process succession, electronic device and storage medium |
| CN113064748A (en) * | 2021-04-08 | 2021-07-02 | 中国第一汽车股份有限公司 | Process succession method, device, electronic equipment and storage medium |
| CN113360287A (en) * | 2021-06-21 | 2021-09-07 | 上海哔哩哔哩科技有限公司 | Data processing method and device |
| CN113360287B (en) * | 2021-06-21 | 2022-09-23 | 上海哔哩哔哩科技有限公司 | Data processing method and device |
| CN114942851B (en) * | 2022-07-25 | 2023-04-25 | 北京优合融宜科技有限公司 | Method and device for reading and writing memory data |
| CN114942851A (en) * | 2022-07-25 | 2022-08-26 | 北京优合融宜科技有限公司 | Memory data reading and writing method and reading and writing device |
| CN116010501A (en) * | 2022-12-30 | 2023-04-25 | 百果园技术(新加坡)有限公司 | Distributed medium-level data processing method, system, device, storage medium and program product |
| CN116107517A (en) * | 2023-04-11 | 2023-05-12 | 远江盛邦(北京)网络安全科技股份有限公司 | Data synchronization method, device, electronic equipment and storage medium |
| CN116107517B (en) * | 2023-04-11 | 2023-06-09 | 远江盛邦(北京)网络安全科技股份有限公司 | Data synchronization method, device, electronic equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111813550B (en) | 2025-07-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111813550A (en) | Data processing method, device, server and storage medium | |
| CN111091429B (en) | Electronic bill identification distribution method and device, electronic bill generation system | |
| CN106843749B (en) | Write request processing method, device and device | |
| US9367261B2 (en) | Computer system, data management method and data management program | |
| JP6225262B2 (en) | System and method for supporting partition level journaling to synchronize data in a distributed data grid | |
| US20100106914A1 (en) | Consistency models in a distributed store | |
| JP5686034B2 (en) | Cluster system, synchronization control method, server device, and synchronization control program | |
| CN113094430B (en) | Data processing method, device, equipment and storage medium | |
| CN104081354A (en) | Managing partitions in a scalable environment | |
| US10116762B2 (en) | System and method for storing and processing web service requests | |
| US20150046744A1 (en) | System and method for processing web service transactions using timestamp data | |
| WO2022111188A1 (en) | Transaction processing method, system, apparatus, device, storage medium, and program product | |
| CN109561151B (en) | Data storage method, device, server and storage medium | |
| WO2022174735A1 (en) | Data processing method and apparatus based on distributed storage, device, and medium | |
| JP2013171301A (en) | Device, method, and program for job continuation management | |
| US8359601B2 (en) | Data processing method, cluster system, and data processing program | |
| WO2017157111A1 (en) | Method, device and system for preventing memory data loss | |
| EP4654560A1 (en) | Method, apparatus, device, and medium for data preheating used in cdn | |
| CN114610680A (en) | Method, device and equipment for managing metadata of distributed file system and storage medium | |
| CN112650629B (en) | Blockchain index data recovery method, device, equipment and computer storage medium | |
| CN111787113A (en) | Node fault processing method and device, storage medium and electronic equipment | |
| CN113407356A (en) | Data processing method and device, electronic equipment and storage medium | |
| CN112632093A (en) | Work order processing method, device, system, storage medium and program product | |
| CN113872994B (en) | Organization architecture synchronization method, device, computer equipment and storage medium | |
| CN114205354A (en) | Event management system, event management method, server, and storage medium |
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 |