Data processing method, device, system, equipment and computer-readable storage medium
Through the preset event registry and unified call interface, the instant effect and synchronization of parameter configuration in the game table status record application scenario is achieved, solving the problems of low parameter configuration efficiency and server shutdown in the existing technology.
Patent Information
- Application Number
- CN202180002701.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-16
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2041-09-16
AI Technical Summary
In the game table status recording application scenario, the server needs to be restarted after the parameter configuration is modified, resulting in slow configuration effect, low efficiency, and may lead to server downtime, affecting high availability.
Through the preset event registry and unified call interface, the parameters in the remote storage space are updated in real time, and the corresponding callback functions are triggered to achieve instant effect and synchronization of parameter modifications.
It improves the efficiency of parameter configuration, ensures that the service can take effect immediately after parameter modification, reduces server downtime, and improves the system's high availability and synchronization of parameter configuration.
Smart Images

Figure CN113660988B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This disclosure claims priority to Singapore patent application number 10202109388P filed with the Intellectual Property Office of Singapore on August 27, 2021, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present disclosure relates to computer network technology, and in particular to a data processing method, apparatus, system, device, and computer-readable storage medium. Background Art
[0004] At present, for the application scenario of recording the status of the game table through the service on the server, when the parameters such as the desktop layout of the game table, participant information, game rules or network connection configuration change, the configuration parameters of the service need to be modified and updated in time. However, after modifying the configuration parameters, the current parameter configuration method needs to restart the service on the server and use the initialization process of the service to load the modified configuration parameters. The parameters configured in such a parameter configuration process take effect slowly and will cause the server to be unable to provide services during downtime, thereby reducing the efficiency of parameter configuration. Summary of the invention
[0005] The embodiments of the present disclosure provide a data processing method, apparatus, system, device, and computer-readable storage medium, which can improve the efficiency of parameter configuration.
[0006] The technical solution of the embodiment of the present disclosure is implemented as follows:
[0007] The present disclosure provides a data processing method, including:
[0008] In the case of receiving a parameter modification request for a first service, triggering a target parameter modification event in a first preset event registry according to a target parameter in the parameter modification request; and updating a remote parameter corresponding to the target parameter in a remote storage space through a unified calling interface; the first preset event registry represents a mapping relationship between a first preset parameter in the first service, a first preset parameter modification event, and a first preset callback function; the remote storage space is used to store at least one remote parameter of at least one service;
[0009] Using the target parameter, calling the target callback function corresponding to the target parameter modification event, and loading the target parameter into the first service;
[0010] The first service is run, and based on the target parameter, a game state of the game area is recorded.
[0011] When a parameter modification request is received, a corresponding target parameter modification event can be triggered according to the target parameter, and then as a response to the target parameter modification event, the corresponding target callback function is called to load the target parameter to the first service in real time, so that the first service can record the game status based on the new target parameter value, and thus the callback function of the parameter modification event can be configured as a parameter loading method in the event registration table in advance, and the parameter modification request can be responded to through the event triggering mechanism, and the corresponding callback function can be called in real time, so that the parameter change takes effect immediately; and, for the remote storage space composed of different types of storage devices in the actual scenario, the corresponding remote parameters in the remote storage space can be managed and updated indiscriminately through a unified calling interface, so as to achieve parameter synchronization of at least one service, thereby greatly improving the efficiency of parameter configuration.
[0012] In the above method, before triggering the target parameter modification event in the first preset event registration table according to the target parameter in the parameter modification request, the method further includes:
[0013] In the case of initializing the first service, obtaining at least one first preset parameter corresponding to the first service and a first preset parameter loading method corresponding to each first preset parameter in the at least one first preset parameter; wherein the target parameter belongs to at least one first preset parameter; and the first preset parameter loading method is a parameter loading method preconfigured in the first service;
[0014] For each of the first preset parameters, a first preset parameter modification event corresponding to each of the first preset parameters is generated; wherein the first preset callback function corresponding to the first preset parameter modification event is the first preset parameter loading method corresponding to each of the first preset parameters; the target parameter modification event is the first preset parameter modification event corresponding to the target parameter in the first preset event registry; the target callback function is the first preset callback function corresponding to the target parameter modification event;
[0015] The first preset parameter modification event is correspondingly registered on each of the first preset parameters to obtain a mapping relationship between the first preset parameter, the first preset parameter modification event and the first preset callback function as the first preset event registration table.
[0016] By generating a first preset parameter modification event corresponding to each first preset parameter and registering it on the corresponding first preset parameter, and setting the first preset callback function of the first preset parameter modification event as the first preset parameter loading method of the corresponding first preset parameter, a mapping relationship between at least one first preset parameter, a first preset parameter modification event and a first preset callback function is implemented as a first preset event registration table. In this way, when the first preset parameter in the first preset event registration table changes, the first preset callback function corresponding to the event can be called through the corresponding event trigger response mechanism, and the first preset parameter loading method implemented in the first preset callback function is executed, and the corresponding target parameter is loaded into the first service in real time, thereby improving the efficiency of parameter configuration.
[0017] In the above method, when a parameter modification request for the first service is received, triggering a target parameter modification event in the first preset event registration table according to the target parameter in the parameter modification request includes:
[0018] When receiving a parameter modification request through a preset parameter modification interface, calling a preset event driven method pre-implemented in the preset parameter modification interface, and accessing the first preset event registration table according to the target parameter;
[0019] In the first preset event registration table, a first preset parameter modification event corresponding to the target parameter is determined as the target parameter modification event, and the target parameter modification event is triggered by the preset event driving method.
[0020] By pre-implementing a preset event-driven method in a preset parameter modification interface, a target parameter modification event corresponding to a target parameter can be immediately triggered when a parameter modification request is received, thereby improving the efficiency of parameter configuration.
[0021] In the above method, using the target parameter, calling the target callback function corresponding to the target parameter modification event, and loading the target parameter into the first service includes:
[0022] Determining a target callback function corresponding to the target parameter modification event according to the first preset event registration table;
[0023] Through the preset event-driven method, the target callback function is called using the target parameter, the target parameter is passed into the target preset parameter loading method implemented in the target callback function, and the target parameter is loaded into the first service through the target prediction parameter loading method; the target preset parameter loading method is the first preset parameter loading method corresponding to the target parameter in at least one first preset parameter loading method; the at least one first preset parameter loading method is the preset parameter loading method corresponding to at least one first preset parameter in the first service.
[0024] Since in the first preset event registry, the first preset callback function corresponding to each first preset parameter modification event is the first preset parameter loading method of the corresponding first preset parameter, when the target callback function corresponding to the target parameter modification event is obtained through the first preset event registry, the target parameter can be passed into the target parameter loading method corresponding to the target parameter by calling the target callback function, and then the target parameter can be loaded into the first service in real time, so that the first service can be loaded into the latest modified parameter configuration in real time during the current operation process, thereby improving the efficiency of parameter configuration.
[0025] In the above method, updating the remote parameters corresponding to the target parameters in the remote storage space by uniformly calling the interface includes:
[0026] The remote storage space is accessed through the unified calling interface, and a target remote parameter is determined from the at least one remote parameter according to the target parameter name of the target parameter; the remote storage space includes a sub-storage space of at least one storage type; the unified calling interface is used to implement read and write operations on the sub-storage space of at least one storage type through a unified calling method; the target remote parameter is a shared parameter of the first service and the second service; the second service is used to synchronize the business data of the first service;
[0027] The target remote parameters are updated using the target parameters, and the target parameters are synchronously updated to the second service.
[0028] By using the target parameter value to update the target remote parameter in the remote storage space, the parameter values stored locally and remotely for the first service can be kept synchronized in real time. Then, by changing the target remote parameter, the parameter change corresponding to the parameter modification request for the first service can be synchronized in a timely manner to multiple other services that share parameters with it, thereby improving the efficiency of parameter configuration.
[0029] In the above method, the method further comprises:
[0030] According to the target parameter, a first local target parameter corresponding to the target parameter in a first local storage is updated; the first local storage is a storage space on a first host where the first service is located.
[0031] Synchronously updating the parameter changes specified by the parameter modification request to the local cache corresponding to the first service can ensure the consistency of the operating parameters and the local cache parameters, thereby improving the stability of the operation of the first service.
[0032] The present disclosure provides a data processing method, including:
[0033] According to a preset time interval, by a unified calling interface, a second local parameter of the second service in the second local storage is compared with a second remote parameter in the remote storage space to obtain a comparison result; the second local storage is a storage space on the second host where the second service is located; the second remote parameter includes a shared parameter of the first service and the second service; the first service is used to record the game status of the game area;
[0034] In the case where the comparison result indicates that the second local parameter is inconsistent with the second remote parameter, determining the target parameter from the second remote parameter; and triggering the target parameter modification event corresponding to the target parameter name in the second preset event registry according to the target parameter; the second preset event registry indicates the mapping relationship between the second preset parameter name, the second preset parameter modification event and the second preset callback function in the second service;
[0035] Loading the target parameter into the second service by calling the target callback function corresponding to the target parameter modification event;
[0036] The second service is run, and the first service is synchronized based on the target parameter.
[0037] By periodically comparing the differences between local parameters and remote parameters, parameter change events can be quickly discovered. By pre-designing an event-driven model and pre-defining the events that need to be executed after the parameters are changed, the updated remote parameters can be synchronized to the local server in a timely manner for loading through an event-triggered response mechanism, so that the changed configuration parameters can take effect in real time on the second service, thereby improving the efficiency of parameter configuration.
[0038] In the above method, before triggering the target parameter modification event corresponding to the target parameter name in the second preset event registration table according to the target parameter, the method further includes:
[0039] When the second service is initialized, the second preset event registration table is obtained based on at least one second preset parameter corresponding to the second service and at least one second preset parameter loading method corresponding to the at least one second preset parameter; in the second preset event registration table, the at least one second preset parameter corresponds one-to-one to at least one second preset parameter modification event; each second preset parameter loading method in the at least one second preset parameter loading method is a callback function corresponding to each of the at least one second preset parameter modification events.
[0040] By generating a second preset event registration table of mapping relationships between each second preset parameter, second preset parameter modification event and second preset callback function, the target parameters involved in the parameter change can be loaded into the second service in real time through an event trigger response mechanism, thereby improving the efficiency of parameter configuration.
[0041] In the above method, after determining the target parameter from the second remote parameter, the method further includes:
[0042] The target parameter is read from the remote storage space through the unified calling interface; the remote storage space includes a sub-storage space of at least one storage type;
[0043] According to the target parameter, a second local target parameter corresponding to the target parameter in the first local storage is updated; the second local storage is a storage space on the second host where the second service is located.
[0044] By calling through a unified calling interface, unified abstraction of read and write operations of different types of sub-storage spaces is achieved, so that the second service can manage system configuration parameters of each storage location without distinction, thereby improving the efficiency and maintainability of parameter configuration.
[0045] The embodiment of the present disclosure provides a data processing system, including: a first host and a second host, wherein a first service is running on the first host, and a second service is running on the second host;
[0046] The first host is used to trigger a target parameter modification event in a first preset event registry according to a target parameter in the parameter modification request when receiving a parameter modification request for the first service; and update a remote parameter corresponding to the target parameter in a remote storage space through a unified calling interface; the first preset event registry represents a mapping relationship between a first preset parameter, a first preset parameter modification event, and a first preset callback function in the first service; using the target parameter, calling a target callback function corresponding to the target parameter modification event, and loading the target parameter into the first service; running the first service, and recording a game state of a game area based on the target parameter;
[0047] The second host is used to compare the second local parameter of the second service in the second local storage with the second remote parameter in the remote storage space through the unified calling interface according to a preset time interval to obtain a comparison result; when the comparison result indicates that the second local parameter is inconsistent with the second remote parameter, determine the target parameter from the second remote parameter; and trigger the target parameter modification event corresponding to the target parameter name in the second preset event registration table according to the target parameter; the target parameter is a shared parameter of the first service and the second service in the at least one service; load the target parameter into the second service by calling the target callback function corresponding to the target parameter modification event; run the second service, and synchronize the first service based on the target parameter.
[0048] The present disclosure provides a first data processing device, including:
[0049] The first triggering part is configured to, upon receiving a parameter modification request for a first service, trigger a target parameter modification event in a first preset event registry according to a target parameter in the parameter modification request; and update a remote parameter corresponding to the target parameter in a remote storage space through a unified calling interface; the first preset event registry represents a mapping relationship between a first preset parameter in the first service, a first preset parameter modification event, and a first preset callback function; the remote storage space is used to store at least one remote parameter of at least one service;
[0050] A first calling part is configured to use the target parameter to call a target callback function corresponding to the target parameter modification event, and load the target parameter into the first service;
[0051] The recording part is configured to run the first service and record the game state of the game area based on the target parameter.
[0052] In the above device, the first data processing device also includes a first registration part; the first registration part is configured to obtain at least one first preset parameter corresponding to the first service and a first preset parameter loading method corresponding to each first preset parameter in the at least one first preset parameter before triggering the target parameter modification event in the first preset event registration table according to the target parameter in the parameter modification request, when the first service is initialized; wherein the target parameter belongs to at least one first preset parameter; the first preset parameter loading method is a parameter loading method pre-configured in the first service; for each first preset parameter, a first preset parameter modification event corresponding to each first preset parameter is generated; wherein the first preset callback function corresponding to the first preset parameter modification event is the first preset parameter loading method corresponding to each first preset parameter; the target parameter modification event is the first preset parameter modification event corresponding to the target parameter in the first preset event registration table; the target callback function is the first preset callback function corresponding to the target parameter modification event; the first preset parameter modification event is correspondingly registered on each first preset parameter, and a mapping relationship between the first preset parameter, the first preset parameter modification event and the first preset callback function is obtained as the first preset event registration table.
[0053] In the above-mentioned device, the first trigger part is also configured to call the preset event driven method pre-implemented in the preset parameter modification interface when receiving the parameter modification request through the preset parameter modification interface, and access the first preset event registry according to the target parameter; in the first preset event registry, determine the first preset parameter modification event corresponding to the target parameter as the target parameter modification event, and trigger the target parameter modification event through the preset event driven method.
[0054] In the above-mentioned device, the first calling part is also configured to determine the target callback function corresponding to the target parameter modification event according to the first preset event registration table; through the preset event driven method, the target callback function is called using the target parameter, the target parameter is passed into the target preset parameter loading method implemented in the target callback function, and the target parameter is loaded into the first service through the target prediction parameter loading method; the target preset parameter loading method is the first preset parameter loading method corresponding to the target parameter in at least one first preset parameter loading method; the at least one first preset parameter loading method is the preset parameter loading method corresponding to at least one first preset parameter in the first service.
[0055] In the above-mentioned device, the first trigger part is also configured to access the remote storage space through the unified calling interface, and determine the target remote parameter from the at least one remote parameter according to the target parameter name of the target parameter; the remote storage space contains at least one sub-storage space of storage type; the unified calling interface is used to implement read and write operations on the at least one sub-storage space of storage type through a unified calling method; the target remote parameter is a shared parameter between the first service and the second service; the second service is used to synchronize the business data of the first service; the target remote parameter is updated using the target parameter, and the target parameter is synchronously updated to the second service.
[0056] In the above-mentioned device, the first data processing device also includes a first updating part; the first updating part is configured to update the first local target parameter corresponding to the target parameter in the first local storage according to the target parameter; the first local storage is the storage space on the first host where the first service is located.
[0057] The present disclosure provides a second data processing device, including:
[0058] The comparison part is configured to compare the second local parameter of the second service in the second local storage with the second remote parameter in the remote storage space according to a preset time interval through a unified calling interface to obtain a comparison result; the second local storage is a storage space on the second host where the second service is located; the second remote parameter includes a shared parameter of the first service and the second service; the first service is used to record the game state of the game area;
[0059] The second triggering part is configured to determine the target parameter from the second remote parameter when the comparison result indicates that the second local parameter is inconsistent with the second remote parameter; and trigger the target parameter modification event corresponding to the target parameter name in the second preset event registration table according to the target parameter; the second preset event registration table indicates the mapping relationship between the second preset parameter name, the second preset parameter modification event and the second preset callback function in the second service;
[0060] The second calling part 2553 is configured to load the target parameter into the second service by calling the target callback function corresponding to the target parameter modification event;
[0061] The synchronization part 2554 is configured to run the second service and synchronize the first service based on the target parameter.
[0062] In the above-mentioned device, the second data processing device also includes: a second registration part, the second registration part is configured to obtain the second preset event registration table based on at least one second preset parameter corresponding to the second service and at least one second preset parameter loading method corresponding to the at least one second preset parameter, before triggering the target parameter modification event corresponding to the target parameter name in the second preset event registration table according to the target parameter, when the second service is initialized; in the second preset event registration table, the at least one second preset parameter corresponds to at least one second preset parameter modification event one by one; each second preset parameter loading method in the at least one second preset parameter loading method is a callback function corresponding to each of the at least one second preset parameter modification events.
[0063] In the above-mentioned device, the second data processing device also includes: a second update part, the second update unit, which is configured to read the target parameter from the remote storage space through the unified calling interface after determining the target parameter from the second remote parameter; the remote storage space contains at least one sub-storage space of storage type; according to the target parameter, the second local target parameter corresponding to the target parameter in the first local storage is updated; the second local storage is the storage space on the second host where the second service is located.
[0064] An embodiment of the present disclosure provides an electronic device, including:
[0065] A memory for storing executable instructions;
[0066] The processor is used to implement any of the methods provided by the above-mentioned embodiments of the present disclosure when executing the executable instructions stored in the memory.
[0067] An embodiment of the present disclosure provides a computer-readable storage medium storing executable instructions for causing a processor to execute instructions to implement any of the methods provided by the embodiments of the present disclosure.
[0068] The embodiments of the present disclosure have the following beneficial effects:
[0069] When a parameter modification request is received, a corresponding target parameter modification event can be triggered according to the target parameter, and then as a response to the target parameter modification event, the corresponding target callback function is called to load the target parameter to the first service in real time, so that the first service can record the game status based on the value of the new target parameter, and thus the callback function of the parameter modification event can be configured as a parameter loading method in the event registration table in advance, and the parameter modification request can be responded to through the event triggering mechanism, and the corresponding callback function can be called in real time, so that the parameter change takes effect immediately; and the corresponding remote parameters in the remote storage space can be updated through a unified calling interface, so as to achieve parameter synchronization of at least one service, thereby greatly improving the efficiency of parameter configuration. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 is an optional structural diagram of a data processing system architecture provided by an embodiment of the present disclosure;
[0071] Figure 2 is an optional structural diagram of a first data processing device provided by an embodiment of the present disclosure;
[0072] Figure 3 is an optional structural diagram of a second data processing device provided in an embodiment of the present disclosure;
[0073] Figure 4 is an optional flow chart of a data processing method on a first host provided by an embodiment of the present disclosure;
[0074] Figure 5 is an optional flow chart of a data processing method on a first host provided by an embodiment of the present disclosure;
[0075] Figure 6 is an optional flow chart of a data processing method on a first host provided by an embodiment of the present disclosure;
[0076] Figure 7 is an optional flow chart of a data processing method on a first host provided by an embodiment of the present disclosure;
[0077] Figure 8 is an optional flow chart of a data processing method on a first host provided by an embodiment of the present disclosure;
[0078] Fig. 9 is a schematic diagram of the calling relationship of the first service provided by the embodiment of the present disclosure;
[0079] Fig.10 is an optional flow chart of a data processing method on a second host provided by an embodiment of the present disclosure;
[0080] Fig.11 is an optional flow chart of a data processing method on a second host provided by an embodiment of the present disclosure;
[0081] Fig.12 is a flowchart of a process of sharing parameters between a first service and a second service provided by an embodiment of the present disclosure;
[0082] Fig.13 It is an exemplary application schematic diagram in an actual application scenario provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0083] In order to make the objectives, technical solutions and advantages of the present disclosure clearer, the present disclosure will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present disclosure. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0084] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0085] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present disclosure described herein can be implemented in an order other than that illustrated or described herein.
[0086] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present disclosure belongs. The terms used herein are only for the purpose of describing the embodiments of the present disclosure and are not intended to limit the present disclosure.
[0087] Before further describing the embodiments of the present disclosure in detail, the nouns and terms involved in the embodiments of the present disclosure are described. The nouns and terms involved in the embodiments of the present disclosure are subject to the following interpretations.
[0088] 1) Distributed deployment is a technical solution that can’t be handled by one device for massive amounts of data or for special requirements such as security issues. The essence of distributed deployment is to distribute tasks that were originally completed by one machine to multiple machines to improve efficiency.
[0089] 2) A distributed system is a software system built on a distributed network. In a distributed database, users do not feel that the data is distributed, that is, users do not need to know whether the relationship is divided, whether there are copies, which site the data is stored in, and which site the transaction is executed on. From the perspective of the process, if two programs run on the processes of two hosts respectively and cooperate with each other to finally complete the same service, then the system composed of these two programs can be called a "distributed system."
[0090] 3) Cluster: Clustering is a method of horizontally expanding the same application on multiple devices such as servers to improve service capabilities.
[0091] 4) Cluster storage: Cluster storage aggregates the storage space in multiple storage devices into a storage pool and provides a unified access interface and management interface to the application server. Applications can transparently access and utilize the disks on all storage devices through this access interface, giving full play to the performance of storage devices and disk utilization. Data in cluster storage will be stored and read from multiple storage devices according to certain rules to obtain higher concurrent access performance.
[0092] At present, a complete business application on the server often needs to adapt to various scenarios and requirements, such as database address switching, log level changes, or specific rule adaptation between the test environment and the production environment. Usually, the system configuration parameters of the business application are modified to adapt to different application scenario parameters. For business applications that have been online, the system configuration parameters need to be modified in the online environment and can be applied immediately. However, the current solution generally requires restarting the business application after modifying the system configuration so that it can be initialized with the new system configuration parameters. This will cause the business application to be unable to provide services for a period of time, which is obviously unreasonable for high-availability scenarios.
[0093] In addition, for some requirements for multi-type storage adaptation, such as multi-vendor interface adaptation, a business application needs to adapt to multiple different storage sources at the same time, such as local files, databases, object storage services (OSS), etc. The system configuration parameters of different modules in the business application can be maintained by different storage sources and uniformly managed and maintained by the business application. If the business application needs to be restarted and initialized every time the configuration changes, the availability of the business application will be greatly reduced.
[0094] Furthermore, when business applications need to be deployed in a distributed manner, the states of multiple services of the business application are required to be synchronized, and parameter configuration changes need to be quickly synchronized to other services. However, based on the current parameter configuration solution, it is impossible to achieve fast synchronization of business application parameter changes in distributed deployment scenarios.
[0095] The embodiments of the present disclosure provide a data processing method, apparatus, system, device, and computer-readable storage medium, which can improve the efficiency of parameter configuration. The exemplary application of the electronic device provided by the embodiments of the present disclosure is described below. The electronic device provided by the embodiments of the present disclosure can be implemented as various types of user terminals such as laptops, tablet computers, desktop computers, set-top boxes, mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), and can also be implemented as servers. The following will describe an exemplary application when the device is implemented as a server.
[0096] See also Figure 1 , Figure 1 It is an optional architecture diagram of the data processing system 100 provided by the embodiment of the present disclosure. In order to realize a business application supporting a cluster deployment, the client device 400 is connected to the server 200 through the network 300, wherein the server 200 may be a cluster including at least one host (hosts 200-1 to 200-n are shown as examples), and the network 300 may be a wide area network or a local area network, or a combination of the two. At least one service (the first service, the second service to the nth service are shown as examples) is deployed on the host 200-1, the host 200-2 to the host 200-n in a distributed manner. At least one service can store the corresponding parameters as at least one remote parameter in a remote storage space such as a storage device 500, and each remote parameter corresponds to a data record in the storage device 500. During the initialization phase of the data processing system 100, the parameter value of at least one remote parameter in the storage device 500 can be initialized first. When at least one service is started, it can read the corresponding local storage space, such as cache 1, cache 2 to cache n, from the storage device 500 through the unified call interface 510 for the operation of its respective service. In this way, at least one service can share parameters through the storage device 500. During the operation of at least one distributed deployed service, it is necessary to keep consistent the parameters loaded in the current operation, the local parameters in the local storage space, and the corresponding remote parameters in the remote storage space. In other words, for at least one distributed deployed service, when the parameters of one of the services change, the parameter changes need to be synchronized to the loaded parameters, local parameters, and remote parameters corresponding to each service in a timely manner.
[0097] In some embodiments, the first service on the host 200-1 may be a main service that is currently providing business services to the outside, such as a service that records the game status of the game area. The second service to the nth service on the host 200-2 to the host 200-n may be a replica service with the same function as the first service. The second service to the nth service does not provide business services to the outside, and is used to keep real-time synchronization with the business data of the first service, such as business status and business progress, during the operation of the first service, so that it can be used as a business backup for the first service, so that the data processing system 100 can switch to other services with the same business status or progress at any time in the event of a failure of the first service, such as any one of the second service to the nth service, to reduce server downtime, so as to be able to serve in a high-availability scenario. In this scenario, the parameters of the first service and the second service to the nth service are the same parameters, and these same parameters are maintained by the first service and the second service to the nth service in their respective local storage spaces, and are uniformly stored in the remote storage space, i.e., the storage device 500, as shared parameters. In this way, when the parameter modification request modifies the parameters on the first service, it is necessary to synchronize the modified parameters to the second service to the nth service in a timely manner.
[0098] In some embodiments, the second service to the nth service may also be an application that shares the same parameters as the first service, and runs together with the first service in an application scenario configured with the same shared parameters, and jointly provides business services to the outside. Exemplarily, for a scenario in which the first service and the second service to the nth service can respectively record the game status on different game areas, the heat map corresponding to different game areas may be the same. In this way, the same heat map can be uniformly stored in the storage device 500 as a shared parameter, and the parameters corresponding to the first service and the second service to the nth service are read into their respective local storage spaces, and loaded at runtime to normally implement the recording function of the game area. For this scenario, when the parameters corresponding to any one of the first service, the second service to the nth service are modified, it is necessary to synchronize the changed parameters to the corresponding shared parameters in the storage device 500, as well as other services related thereto, to achieve rapid unification of parameter configuration.
[0099] Figure 1 In the embodiment, the storage device 500 (storage device 500-1 and storage device 500-2 are shown as examples) is used to provide a sub-storage space of at least one storage type, and the at least one storage type may include file storage, database storage, object storage, etc. The sub-storage space of at least one storage type can be uniformly managed by the first application, the second application to the nth application through the unified calling interface 510, such as read and write operations.
[0100] Figure 1 In the example, the client device 400 belongs to the administrator of the data processing system 100, and is used to initiate a modification operation on the specified configuration parameters through the operation and maintenance client software 410, and use the specified configuration parameters as the target parameters to generate a parameter modification request corresponding to the modification operation; and send the parameter modification request to the server 200 through the network 300. Usually, the parameter modification request will be sent to the first service on the host 200-1 that is currently providing the service. Among them, the parameters of the first service are respectively stored in the local cache 1 of the host 200-1 and the remote storage device 500. The host 200-1 is used to trigger the target parameter modification event in the first preset event registry according to the target parameter in the parameter modification request when receiving the parameter modification request for the first service; and update the remote parameters corresponding to the target parameters in the remote storage space, i.e., the storage device 500, through a unified calling interface; the first preset event registry represents the mapping relationship between the first preset parameter, the preset parameter modification event and the callback function in the first service; using the target parameter, calling the target callback function corresponding to the target parameter modification event, and loading the target parameter to the first service; running the first service, based on the target parameter, recording the game status of the game area.
[0101] Among them, the host 200-2 is used to compare the second local parameters of the second service in the second local storage, i.e., cache 2, with the corresponding second remote parameters of the second service in the remote storage space according to a preset time interval through a unified calling interface to obtain a comparison result; when the comparison result indicates that the second local parameter is inconsistent with the second remote parameter, determine the target parameter from the second remote parameter; according to the target parameter, trigger the target parameter modification event corresponding to the target parameter name in the second preset event registry, and load the target parameter into the second service by calling the target callback function corresponding to the target parameter modification event; the second preset event registry represents the mapping relationship between the parameter name, preset parameter modification event and callback function in the second service; run the second service, and synchronize the first service based on the target parameter.
[0102] It should be noted that, here, for other services that contain shared parameters with the first service, such as the third service on host 200-3 to the nth service on host 200-n, each can update the changed shared parameters in the storage device 500 through the same data processing method as the second service, thereby realizing global real-time synchronization of parameter changes in distributed deployment services, which will not be repeated here.
[0103] It should be noted that, based on the network structure of the data processing system 100, the second service or the nth service on the host 200-2 or the host 200-n can also be used as the service currently providing business functions, and the parameter modification request is received through the second service or the nth service, and the real-time loading of the target parameters and the update of the shared parameters in the storage device 500 are realized through the data processing method in the embodiment of the present disclosure; and the synchronization and real-time loading of the updated shared parameters are realized through the first service. That is, in the data processing system 100, the business roles between the host 200-1, the host 200-2 to the host 200-n can be interchanged. The specific selection is made according to the actual situation, and the embodiment of the present disclosure does not limit it.
[0104] In some embodiments, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present disclosure.
[0105] See also Figure 2 , Figure 2 is a schematic diagram of the structure of the host 200-1 in the server 200 provided in an embodiment of the present disclosure, Figure 2 The host 200-1 shown includes: at least one first processor 210-1, a first memory 250-1, at least one first network interface 220-1 and a first user interface 230-1. The various components in the host 200-1 are coupled together through a first bus system 240-1. It can be understood that the first bus system 240-1 is used to achieve connection and communication between these components. In addition to the data bus, the first bus system 240-1 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 2 In the figure, various buses are labeled as a first bus system 240 - 1 .
[0106] The first processor 210-1 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0107] The first user interface 230-1 includes one or more first output devices 231-1 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The first user interface 230-1 also includes one or more first input devices 232-1, including user interface components that facilitate user input, such as a keyboard, a mouse, a microphone, a touch screen display, a camera, other input buttons and controls.
[0108] The first memory 250-1 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The first memory 250-1 may optionally include one or more storage devices physically located away from the first processor 210-1.
[0109] The first memory 250-1 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The first memory 250-1 described in the embodiment of the present disclosure is intended to include any suitable type of memory.
[0110] In some embodiments, the first memory 250 - 1 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0111] The first operating system 251-1 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0112] A first network communication module 252-1, used to reach other computing devices via one or more (wired or wireless) first network interfaces 220-1, exemplary first network interfaces 220 include: Bluetooth, wireless compatibility certification (WiFi), and Universal Serial Bus (USB), etc.;
[0113] A first presentation module 253-1 for enabling presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more first output devices 231-1 (e.g., a display screen, a speaker, etc.) associated with the first user interface 230-1;
[0114] The first input processing module 254-1 is used to detect one or more user inputs or interactions from one of the one or more first input devices 232-1 and translate the detected inputs or interactions.
[0115] In some embodiments, the apparatus provided by the embodiments of the present disclosure may be implemented in software. Figure 2 A first data processing device 255-1 stored in a first memory 250-1 is shown, which may be software in the form of a program and a plug-in, etc., and includes the following software parts to implement the functions of the host 200-1: a first trigger part 2551, a first call part 2552 and a recording part 2553. These software parts are logical and can therefore be arbitrarily combined or further split according to the functions implemented.
[0116] See also Figure 3 , Figure 3 is a schematic diagram of the structure of the host 200-2 in the server 200 provided in an embodiment of the present disclosure, Figure 3 The host 200-2 shown includes: at least one second processor 210-2, a second memory 250-2, at least one second network interface 220-2 and a second user interface 230-2, etc. The functions of the components in the host 200-2 are similar to the functions of the components with corresponding names in the above host 200-1, and will not be repeated here. Figure 3 A second data processing device 255-2 stored in a second memory 250-2 is shown, which may be software in the form of a program and a plug-in, etc., and includes the following software parts to implement the functions of the host 200-2: a comparison part 2551, a second trigger part 2552, a second call part 2553 and a synchronization part 2554. These software parts are logical, and therefore can be arbitrarily combined or further split according to the functions implemented.
[0117] It will be explained below Figure 2 and Figure 3 The functions of each software part.
[0118] In other embodiments, the device provided by the embodiments of the present disclosure may be implemented in hardware. As an example, the device provided by the embodiments of the present disclosure may be a processor in the form of a hardware decoding processor, which is programmed to execute the data processing method provided by the embodiments of the present disclosure. For example, the processor in the form of a hardware decoding processor may adopt one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or other electronic components.
[0119] The data processing method provided by the embodiment of the present disclosure will be explained in conjunction with the exemplary application and implementation of the server provided by the embodiment of the present disclosure.
[0120] See also Figure 4 , Figure 4 is an optional flow chart of a data processing method on a first host provided by an embodiment of the present disclosure, which will be combined with Figure 4 The steps shown are explained.
[0121] S101. When a parameter modification request for a first service is received, a target parameter modification event in a first preset event registry is triggered according to a target parameter in the parameter modification request; and a remote parameter corresponding to the target parameter in a remote storage space is updated through a unified calling interface; the first preset event registry represents a mapping relationship between a first preset parameter in the first service, a preset parameter modification event, and a callback function; and the remote storage space is used to store at least one remote parameter of at least one service.
[0122] In the disclosed embodiment, a user can log in to the data processing system through a client device, initiate a parameter modification request for a target parameter, and send the parameter modification request to a server cluster including multiple hosts. Usually, the parameter modification request will be received by the host currently providing business services in the server cluster, that is, the first host. The first service on the first host is an application service that is providing business services. In some embodiments, the first service can be used to detect the game status of the game area.
[0123] In the disclosed embodiment, the first service maintains a first preset event registry corresponding to it, and the first preset event registry represents the mapping relationship between the first preset parameter, preset parameter modification event and callback function in the first service. The first preset parameter is a configuration parameter corresponding to the first service, and the first preset event registry contains at least one first preset parameter modification event. At least one first preset parameter modification event can be registered one-to-one with at least one first preset parameter corresponding to the first service during the initialization phase of the first service, as an event handler for at least one first preset parameter. In this way, when the state of the first preset parameter changes, such as when a parameter modification request modifies a specified first preset parameter to a target parameter, the first service will call the corresponding first preset parameter modification event, i.e., the target parameter modification event, according to the object that triggers the event, i.e., the target parameter.
[0124] In the embodiment of the present disclosure, each first preset parameter modification event is bound to a first preset callback function, and each first preset callback function is used to be called by the first service as a response method for event triggering when it is triggered in the first preset parameter modification event corresponding to it. Among them, the internal implementation of the first preset callback function corresponding to each first preset parameter modification event is the first preset parameter loading method of the first preset parameter corresponding to the first preset parameter modification event.
[0125] In the disclosed embodiment, each host of the data processing system can be configured with its own preset event registry. For example, a second preset event registry can be configured correspondingly for the second service on the second host. In this way, when the service on each host detects the target parameters that need to be configured, such as for the first service, it is when the target parameters in the parameter modification request are received, and for the second service, it can be when the target parameters in the remote storage space are monitored to be updated, etc., the service on each host can call the preset loading method corresponding to the target parameters according to the preset event registry corresponding to each host, and load the target parameters in real time by using the event trigger response mechanism.
[0126] In some embodiments, the first preset parameters may include the camera angle, game participant information, heat map, game rules, and the server's own network configuration parameters, such as network address, maximum number of connections, connected client address, port number, etc. Among them, the camera is used to record the game scene image generated by the game process in the game area from different angles, and the heat map is the various game function areas pre-divided on the game area. The area corresponding to the heat map in the game scene image can be identified and analyzed by an image recognition method to intelligently identify the current state or progress of the game process.
[0127] In some embodiments, the first host can set an event driver in the functional interface for receiving parameter modification requests. In this way, when a parameter modification request is received through the parameter modification interface, the corresponding target parameter modification event in the first preset event registration table can be triggered according to the target parameters by calling the event driver.
[0128] In the embodiment of the present disclosure, when the first host receives a parameter modification request for the first service, it will parse the network data packet corresponding to the parameter modification request to obtain the target parameter contained therein; wherein the target parameter may include a target parameter name and a target parameter value. In this way, the process of the first host triggering the target parameter modification event in the first preset event registry according to the target parameter in the parameter modification request can be implemented as follows: according to the target parameter name of the target parameter, the corresponding first preset parameter modification event is determined from the first preset event registry as the target parameter modification event; then the target parameter is used to trigger the target parameter modification event, and the target parameter value is passed into the internal processing program of the target parameter modification event, so that the target callback function pre-bound in the target parameter modification event obtains the target parameter value, and the target parameter value is loaded in real time.
[0129] In the embodiment of the present disclosure, in order to keep the local parameters and the remote parameters synchronized, the first host can also update the remote parameters corresponding to the target parameters in the remote storage space through a unified calling interface. The remote storage space is used to store at least one remote parameter of at least one service, and the at least one remote parameter can include shared parameters of the first service and the second service, or more services.
[0130] In some embodiments, upon receiving a parameter modification request for a first service, the first host may use different processes to respectively execute two processes: triggering a target parameter modification event in a first preset event registry according to the target parameters in the parameter modification request, and updating the remote parameters corresponding to the target parameters in the remote storage space through a unified calling interface.
[0131] S102: Use the target parameters to call the target callback function corresponding to the target parameter modification event, and load the target parameters into the first service.
[0132] In the disclosed embodiment, as a response to a target parameter modification event being triggered, the first host can use the target parameter to call up a target callback function corresponding to the target parameter modification event, and pass the target parameter value of the target parameter into the target callback function; then execute the target callback function, and load the target parameter value into the first service. In this way, the target parameter configuration can take effect, and the first service can run and provide business services based on the target parameter value.
[0133] In some embodiments, since the first service, during its operation, stores temporary data generated during the operation and current or commonly used first preset parameters in the local storage space of the first host, such as a cache, to quickly call related parameters or data, the first host can also update the first local parameter value corresponding to the target parameter name in the first local storage according to the target parameter name in the target parameter, so as to synchronously update the corresponding parameters of the first service in the local cache; wherein the first local storage is the storage space on the first host where the first service is located.
[0134] S103: Run the first service and record the game status of the game area based on the target parameters.
[0135] In the disclosed embodiment, the first service can apply the latest configured parameters, namely the target parameters, to the running process. By running the first service, the first host can continue to record the game status of the game area in real time based on the target parameters without restarting to make the configured target parameters take effect.
[0136] In some embodiments, the game area can be a game table, a game field, or any other type of game scene area. The specific selection is made based on actual conditions and is not limited in the embodiments of the present disclosure.
[0137] It can be understood that in the embodiments of the present disclosure, when a parameter modification request is received, a corresponding target parameter modification event can be triggered according to the target parameter, and then as a response to the target parameter modification event, the corresponding target callback function is called to load the target parameter to the first service in real time, so that the first service can record the game state based on the value of the new target parameter, and thus the callback function of the parameter modification event can be configured as a parameter loading method in the event registration table in advance, and the parameter modification request can be responded to through the event triggering mechanism, and the corresponding callback function can be called in real time, so as to achieve the effect of immediate effect after the parameter change; and, for the remote storage space composed of different types of storage devices in the actual scenario, the corresponding remote parameters in the remote storage space can be managed and updated indiscriminately through a unified calling interface, so as to achieve parameter synchronization of at least one service, thereby greatly improving the efficiency of parameter configuration.
[0138] See also Figure 5 , Figure 5 is an optional flow chart of a data processing method on a first host provided by an embodiment of the present disclosure, based on Figure 4 , before S101, it can also include S001-S003, which will be combined Figure 5 The steps shown are explained.
[0139] S001. When initializing a first service, obtain at least one first preset parameter corresponding to the first service, and a first preset parameter loading method corresponding to each first preset parameter in the at least one first preset parameter; wherein the target parameter belongs to the at least one first preset parameter; and the first preset parameter loading method is a parameter loading method pre-configured in the first service.
[0140] In the embodiment of the present disclosure, the first host can obtain at least one first preset parameter corresponding to the first service when initializing the first service, and obtain a loading method for each first preset parameter preconfigured in the first service as the first preset parameter loading method corresponding to each first preset parameter. The target parameter is one of the at least one first preset parameter.
[0141] S002. For each first preset parameter, generate a first preset parameter modification event corresponding to each first preset parameter; wherein the first preset callback function corresponding to the first preset parameter modification event is the first preset parameter loading method corresponding to each first preset parameter; the target parameter modification event is the first preset parameter modification event corresponding to the target parameter in the first preset event registry; the target callback function is the first preset callback function corresponding to the target parameter modification event.
[0142] In the disclosed embodiment, the first host may use each first preset parameter as an event object in the event mechanism to generate a corresponding first preset parameter modification event for each first preset parameter; and use the first preset parameter loading method corresponding to each first preset parameter obtained in S001 as the first preset callback function of the first preset parameter modification event corresponding to each first preset parameter, thereby realizing the binding of the first preset parameter, the first preset parameter modification event and the first preset parameter loading method.
[0143] In the disclosed embodiment, the target parameter modification event is the first preset parameter modification event corresponding to the target parameter in the first preset event registration table; the target callback function is the first preset callback function corresponding to the target parameter modification event.
[0144] S003. Register the first preset parameter modification event on each first preset parameter to obtain a mapping relationship between the first preset parameter, the first preset parameter modification event and the first preset callback function as a first preset event registration table.
[0145] In the disclosed embodiment, for each first preset parameter, the first host can register the first preset parameter modification event on the corresponding first preset parameter by mounting, thereby obtaining a mapping relationship between at least one first preset parameter, the first preset parameter modification event and the first preset callback function, as the first preset event registration table corresponding to the first service on the first host.
[0146] In the disclosed embodiment, for each first preset parameter corresponding to the first service, a change management program corresponding to each first preset parameter may be pre-deployed on the first host to process the change event when the corresponding first preset parameter changes. The first host may mount the first preset parameter modification event on the corresponding first preset parameter change management program, so that when the first preset parameter changes, such as when a corresponding parameter modification request is received, the first preset parameter modification event corresponding to the first preset parameter may be triggered by a preset event-driven method, and then the first preset callback function corresponding to the first preset parameter modification event may be called.
[0147] In some embodiments, after S001, the first host may also load each first preset parameter into the first service through the first preset parameter loading method corresponding to each first preset parameter, so as to initialize the first service using the initial first preset parameter value contained in each first preset parameter.
[0148] It can be understood that in the embodiment of the present disclosure, the first host realizes the mapping relationship between at least one first preset parameter, the first preset parameter modification event and the first preset callback function as the first preset event registration table by generating a first preset parameter modification event corresponding to each first preset parameter and registering it on the corresponding first preset parameter, and setting the first preset callback function of the first preset parameter modification event as the first preset parameter loading method of the corresponding first preset parameter. In this way, when the first preset parameter in the first preset event registration table changes, the first preset callback function corresponding to the event can be called through the corresponding event trigger response mechanism, and the first preset parameter loading method implemented in the first preset callback function is executed, and the corresponding target parameter is loaded into the first service in real time, thereby improving the efficiency of parameter configuration.
[0149] See also Figure 6 , Figure 6 is an optional flow chart of a data processing method on a first host provided by an embodiment of the present disclosure, based on Figure 4 or Figure 5 , S101 can be implemented by executing S101-1: upon receiving a parameter modification request for the first service, triggering a target parameter modification event in the first preset event registration table according to the target parameter in the parameter modification request; and S101-2: updating the remote parameter corresponding to the target parameter in the remote storage space through a unified calling interface. Among them, S101-1 can be implemented by executing S101-11 to S101-12, which will be explained in conjunction with each step.
[0150] S101-11. When a parameter modification request is received through a preset parameter modification interface, a preset event driving method pre-implemented in the preset parameter modification interface is called to access a first preset event registration table according to a target parameter.
[0151] In the embodiment of the present disclosure, the first host may pre-implement a preset event-driven method in a preset parameter modification interface used to interact with a client. In this way, when a parameter modification request is received, the preset event-driven method pre-implemented in the preset parameter modification interface is called, and the first preset event registry is accessed according to the target parameter to determine whether the target parameter has a corresponding first preset parameter modification event in the first preset event registry.
[0152] In some embodiments, the preset event driven method can be implemented by a function of the form of event_edit_parameter(pa), where pa represents the target parameter.
[0153] S101 - 12. In a first preset event registration table, determine a first preset parameter modification event corresponding to a target parameter as a target parameter modification event, and trigger the target parameter modification event through a preset event driving method.
[0154] In the disclosed embodiment, the first host may find the first preset parameter to which the target parameter belongs in the first preset event registration table, and, according to the first preset event registration table, take the first preset parameter modification event registered on the first preset parameter to which the target parameter belongs as the target parameter modification event.
[0155] In the embodiment of the present disclosure, when a target parameter modification event is determined, the first host triggers the target parameter modification event through a preset event-driven method.
[0156] It can be understood that in the embodiments of the present disclosure, by pre-implementing a preset event-driven method in a preset parameter modification interface, a target parameter modification event corresponding to a target parameter can be immediately triggered upon receiving a parameter modification request, thereby improving the efficiency of parameter configuration.
[0157] See also Figure 7 , Figure 7 is an optional flow chart of a data processing method on a first host provided by an embodiment of the present disclosure, based on Figure 6 , S102 can be implemented by executing S1021-S1022, which will be explained in conjunction with each step.
[0158] S1021. Determine a target callback function corresponding to a target parameter modification event according to a first preset event registration table.
[0159] In the embodiment of the present disclosure, when a target parameter modification event is triggered, the first host uses the first preset callback function corresponding to the target parameter modification event in the first preset event registration table as the target callback function to respond to the target parameter modification event by calling the target callback function.
[0160] S1022. Call the target callback function with the target parameters through a preset event-driven method, pass the target parameters into the target preset parameter loading method implemented in the target callback function, and load the target parameters into the first service through the target prediction parameter loading method; the target preset parameter loading method is the first preset parameter loading method corresponding to the target parameter in at least one first preset parameter loading method; at least one first preset parameter loading method is a preset parameter loading method corresponding to at least one first preset parameter in the first service.
[0161] In the embodiment of the present disclosure, when the target callback function is determined, the first host can use the target parameters as the input parameters of the target callback function, call the target callback function through a preset event-driven method, pass the target parameters into the target callback function, and during the execution of the target callback function, load the target parameters into the first service through the corresponding target preset parameter loading method implemented in the target callback function.
[0162] In an embodiment of the present disclosure, the target preset parameter loading method is a first preset parameter loading method corresponding to the target parameter in at least one first preset parameter loading method; wherein, at least one first preset parameter loading method is a preset parameter loading method corresponding to at least one first preset parameter of the first service.
[0163] It can be understood that in the embodiments of the present disclosure, since in the first preset event registry, the first preset callback function corresponding to each first preset parameter modification event is the first preset parameter loading method of the corresponding first preset parameter, when the first host obtains the target callback function corresponding to the target parameter modification event through the first preset event registry, it can pass the target parameter into the target parameter loading method corresponding to the target parameter by calling the target callback function, and then load the target parameter into the first service in real time, so that the first service can be loaded into the latest modified parameter configuration in real time during the current operation process, thereby improving the efficiency of parameter configuration.
[0164] In some embodiments, when receiving a parameter modification request for the first service, the first host may also update the first local target parameter corresponding to the target parameter in the first local storage according to the target parameter; wherein the first local storage is a storage space on the first host where the first service is located. In some embodiments, the first local storage may be a cache space used by the first service on the first host. In this way, the parameter change specified by the parameter modification request may be synchronously updated to the local cache corresponding to the first service, ensuring the consistency of the operating parameters with the local cache parameters, and improving the stability of the operation of the first service.
[0165] See also Figure 8 , Figure 8 is an optional flow chart of a data processing method on a first host provided by an embodiment of the present disclosure, based on Figure 4 or Figure 5 , S101-2 in S101 can be implemented by executing S101-21 to S101-22, which will be explained in conjunction with each step.
[0166] S101-21. Access the remote storage space through a unified calling interface, and determine the target remote parameter from at least one remote parameter according to the target parameter name of the target parameter; the remote storage space includes at least one storage type of sub-storage space; the unified calling interface is used to implement read and write operations on at least one storage type of sub-storage space through a unified calling method; the target remote parameter is a shared parameter of the first service and the second service; the second service is used to synchronize the business data of the first service.
[0167] In an embodiment of the present disclosure, for the process of updating the remote storage space using target parameters, the first host can access the remote storage space through a unified calling interface; wherein the remote storage space includes a sub-storage space of at least one storage type; the first host can use the unified calling interface to implement read and write operations on the sub-storage space of at least one storage type through a unified calling method.
[0168] In the disclosed embodiment, the first host can determine the target remote parameter corresponding to the target parameter name from at least one remote parameter in the remote storage space based on the target parameter name of the target parameter. Here, the parameter name of the target remote parameter is consistent with the target parameter name, and the parameter value of the target remote parameter is the original parameter value corresponding to the target parameter name before receiving the parameter modification request.
[0169] S101-22. Use the target parameter value of the target parameter to update the target remote parameter, so that the second service synchronously updates the target remote parameter.
[0170] In the disclosed embodiment, the first host can use the target parameter value of the target parameter to update the parameter value of the target remote parameter. Here, since the target remote parameter is a shared parameter between the first service and the second service, when the target remote parameter is updated, the latest target remote parameter can be obtained through the second service for synchronous update, so that the parameter change corresponding to the parameter modification request for the first service can be synchronized to multiple other services that share the parameter with it.
[0171] It can be understood that by using the target parameter value to update the target remote parameter in the remote storage space, the parameter values stored locally and remotely in the first service can be kept synchronized in real time, and then the parameter changes corresponding to the parameter modification request for the first service can be synchronized to multiple other services that share parameters with it in a timely manner through the change of the target remote parameter, thereby improving the efficiency of parameter configuration.
[0172] In some embodiments, see Fig. 9 , Fig. 9 is a schematic diagram of the calling relationship of the first service provided by the embodiment of the present disclosure, such as Fig. 9 As shown, the first service on the first host itself will maintain the first preset event registry. During the initialization phase, the first service will read the required system configuration parameters as the first preset parameters, such as pa, from the remote storage space through a unified calling interface. At this time, pa corresponds to the initial preset parameter value. The first service calls the init_callback(pa) method to load the preset parameter value of pa, and adds a first preset parameter modification event Epa in the first preset event registry according to pa, and sets the callback function callback-pa of Epa to the function that makes the new pa parameter take effect, namely init_callback(pa), so that the first service can generate the following according to at least one system configuration parameter corresponding to the first service. Fig. 9The first preset event registry is shown. When the first host receives a parameter modification request containing a target parameter pa, the parameter value in pa is a new parameter value. The event driver event_edit_parameter() pre-set in the parameter modification interface can be called according to pa to obtain event_edit_parameter(pa) to access the first preset event registry, modify the target parameter event Epa corresponding to the first preset event registry pa and trigger Epa, and then as a response after the Epa event is triggered, determine the callback function callback-pa corresponding to the Epa event in the first preset event registry, and call the parameter loading method init_callback(pa) set in callback-pa to load the pa containing the new parameter value to the first service. In addition, through the unified calling interface, the pa containing the new parameter value is written to the remote storage space, and the corresponding remote parameters in the remote storage space are updated.
[0173] See also Fig.10 , Fig.10 is an optional flow chart of a data processing method on a second host provided by an embodiment of the present disclosure, which will be combined with Fig.10 The steps shown are explained.
[0174] S201. According to a preset time interval, a second local parameter of the second service in the second local storage is compared with a corresponding second remote parameter of the second service in the remote storage space through a unified calling interface to obtain a comparison result; the remote storage space is used to store at least one remote parameter of at least one service; the at least one remote parameter includes a shared parameter of the first service and the second service; the second local storage is a storage space on the second host where the second service is located; the first service is used to record the game status of the game area.
[0175] In the embodiment of the present disclosure, a second service is running on the second host, and at least one second preset parameter corresponding to the second service is stored in the second local storage and the remote storage space, respectively, wherein the second preset parameter in the second local storage is the second local parameter, and the second preset parameter stored in the remote storage space is the second remote parameter. The second remote parameter includes the shared parameters of the first service and the second service.
[0176] In the embodiment of the present disclosure, the second host can compare the second local parameter with the second remote parameter through a unified calling interface according to a preset time interval to obtain a comparison result.
[0177] S202. When the comparison result indicates that the second local parameter is inconsistent with the second remote parameter, determine the target parameter from the second remote parameter; and trigger the target parameter modification event corresponding to the target parameter name in the second preset event registry according to the target parameter; the second preset event registry represents the mapping relationship between the second preset parameter name, the second preset parameter modification event and the second preset callback function in the second service.
[0178] In the disclosed embodiment, the comparison result indicates whether the second local parameter is consistent with the second remote parameter. When the second local parameter is inconsistent with the second remote parameter, it indicates that the second remote parameter has changed. Since the second remote parameter includes the shared parameters of the first service and the second service, it is possible that the first service has updated one of the shared parameters. Therefore, the second service needs to synchronize the updated shared parameters to the second host in a timely manner.
[0179] In the embodiment of the present disclosure, a second preset event registry is maintained corresponding to the second service on the second host. When the comparison result indicates that the second local parameter is inconsistent with the second remote parameter, the second host determines the target parameter from the second remote parameter; and based on the target parameter, triggers a target parameter modification event corresponding to the target parameter name in the second preset event registry.
[0180] In the disclosed embodiment, the second preset event registry represents the mapping relationship between the second preset parameter name, the second preset parameter modification event and the second preset callback function in the second service. It can be understood that the second preset parameter name here includes the parameter name of the shared parameter with the first service. In this way, the second host can use the target parameter to determine the target parameter modification event corresponding to the target parameter in the mapping relationship of the second preset event registry and trigger the target parameter modification event. The process is the same as the triggering process on the first host, which will not be repeated here.
[0181] In some embodiments, the second host may use the second remote parameters that are inconsistent with the second local parameters as the target parameters to differentially update the second local parameters of the second service, or may directly use all the second remote parameters as the target parameters to globally update the second local parameters. The specific selection shall be made based on actual conditions and is not limited to the embodiments of the present disclosure.
[0182] S203: Load the target parameters into the second service by calling the target callback function corresponding to the target parameter modification event.
[0183] In the disclosed embodiment, the second service loads the target parameters into the second service by calling the target callback function corresponding to the target parameter modification event, which is the same as the corresponding process of calling the target callback function and loading the target parameters into the first service on the first host, and will not be repeated here.
[0184] S204: Run the second service, and synchronize the first service based on the target parameters.
[0185] In the embodiment of the present disclosure, the second service can be a backup service of the first service. When the target parameters are loaded into the second service, the second host can run the second service and synchronize the current business status and business data of the first service to the second service based on the target parameters, thereby realizing synchronization of the first service.
[0186] It can be understood that in the embodiments of the present disclosure, the second service can quickly discover parameter change events by periodically comparing the differences between local parameters and remote parameters, and by pre-designing an event-driven model and pre-defining events that need to be executed after the parameters are changed, it is possible to synchronize the updated remote parameters to the local for loading in a timely manner through an event-triggered response mechanism, so that the changed configuration parameters can take effect in real time on the second service, thereby improving the efficiency of parameter configuration.
[0187] In some embodiments, before triggering the target parameter modification event corresponding to the target parameter name in the second preset event registry according to the target parameter in S202, the following steps can also be performed to generate a second preset event registry, as follows: when initializing the second service, a second preset event registry is obtained based on at least one second preset parameter corresponding to the second service and at least one second preset parameter loading method corresponding to at least one second preset parameter; in the second preset event registry, at least one second preset parameter corresponds one-to-one to at least one second preset parameter modification event; each second preset parameter loading method in the at least one second preset parameter loading method is a callback function corresponding to each of the at least one second preset parameter modification events.
[0188] The above process of generating the second preset event registration table on the second host is consistent with the same process S001-S003 described on the first host, and will not be repeated here.
[0189] See also Fig.11 , Fig.11 is an optional flow chart of a data processing method on a second host provided by an embodiment of the present disclosure, based on Fig.10 S202 can be implemented by executing S202-1: when the comparison result indicates that the second local parameter is inconsistent with the second remote parameter, determining the target parameter from the second remote parameter; and S202-2: triggering the target parameter modification event corresponding to the target parameter name in the second preset event registration table according to the target parameter. After S202-1, S205-S206 can also be executed. Fig.11 The steps shown are explained.
[0190] S205. Read target parameters from the remote storage space through a unified calling interface; the remote storage space includes at least one sub-storage space of a storage type.
[0191] In the embodiment of the present disclosure, the second host can use a unified calling interface to shield different reading and writing methods corresponding to at least one storage type of sub-storage space, and read the target parameters in the remote storage space to the local according to the unified reading and writing operations implemented in the unified calling interface.
[0192] S206. In the second local storage, according to the target parameter name of the target parameter, update the second local parameter value corresponding to the target parameter name in the second local storage.
[0193] In the disclosed embodiment, the second host determines the corresponding second local target parameter in the second local storage based on the target parameter name of the target parameter, and uses the target parameter value of the target parameter to update the parameter value of the second local target parameter, thereby achieving timely synchronization of parameter changes in the remote storage space and the local storage space.
[0194] It can be understood that by calling through a unified calling interface, a unified abstraction of read and write operations of different types of sub-storage spaces is achieved, so that the second service can manage the system configuration parameters of each storage location without distinction, thereby improving the efficiency and maintainability of parameter configuration.
[0195] See also Fig.12 , Fig.12 is a flow chart of the process of sharing parameters between the first service and the second service provided by the embodiment of the present disclosure, which will be combined with Fig.12 The steps shown are explained.
[0196] In the embodiment of the present disclosure, there may be multiple services using the same storage space at the same time in a distributed deployment scenario. For example, the first service and the second service share parameters and use the remote storage space together. Since the client's parameter modification request will only be sent to the first service that is currently providing services, in order to prevent the problem of inconsistent states between services due to inconsistent cached parameter values between multiple services, the second service periodically compares the remote storage space with the second local storage space through the parameter management program, such as whether the parameter value in the second local cache has changed. When the comparison finds that the data corresponding to the configuration parameters of the remote storage space and the second local cache are inconsistent, the second service sends a request to the remote storage space, the remote storage space responds to the request, and quickly synchronizes the target parameters containing the new parameter values to the parameter management program, updates the target parameters in the second local cache through the parameter management program, and triggers the target parameter modification event, i.e., the second parameter modification event, to load the target parameters into the second service, so that the new parameter values in the target parameters take effect in real time.
[0197] Next, we will combine Fig.13 , illustrating an exemplary application of an embodiment of the present disclosure in a practical application scenario.
[0198] like Fig.13 As shown, the remote storage space in the actual data processing system can be a storage space collection containing various types of storage devices, such as MySQL database, object storage service and local configuration files. The data processing system abstracts a unified call interface as a unified configuration management interface, and processes IO operations of different storage types through the unified call interface, so that multiple business services in the data processing system can manage the system configuration parameters of each storage location indiscriminately. Among them, during the initialization phase, the business service in the data processing system can read at least one first preset parameter from the remote storage space through the unified call interface and load it into itself to complete the initialization and start normally, and generate its own corresponding preset event registry based on at least one first preset parameter. In this way, when the business service receives a parameter modification request for itself, or finds that the local parameters corresponding to itself are inconsistent with the parameters in the remote storage space, it can execute the write process corresponding to the parameter change, trigger the target parameter modification event corresponding to the target parameter in the preset event registry, and call the target callback function corresponding to the target parameter modification event at the same time, and load the target parameter into itself, thereby realizing the state synchronization between services during distributed deployment.
[0199] The following is a description of an exemplary structure of the first data processing device 255-1 provided in the embodiment of the present disclosure, which is implemented as a software part. In some embodiments, Figure 2 As shown, the software part stored in the first data processing device 255-1 of the first memory 250-1 may include: a first trigger part 2551, a first calling part 2552 and a recording part 2553, wherein:
[0200] The first triggering part 2551 is configured to, when receiving a parameter modification request for a first service, trigger a target parameter modification event in a first preset event registry according to a target parameter in the parameter modification request; and update a remote parameter corresponding to the target parameter in a remote storage space through a unified calling interface; the first preset event registry represents a mapping relationship between a first preset parameter in the first service, a first preset parameter modification event, and a first preset callback function; the remote storage space is used to store at least one remote parameter of at least one service;
[0201] The first calling part 2552 is configured to use the target parameter to call the target callback function corresponding to the target parameter modification event, and load the target parameter into the first service;
[0202] The recording part 2553 is configured to run the first service and record the game status of the game area based on the target parameter.
[0203] In some embodiments, the first data processing device 255-1 also includes a first registration part; the first registration part is configured to obtain at least one first preset parameter corresponding to the first service and a first preset parameter loading method corresponding to each first preset parameter in the at least one first preset parameter before triggering the target parameter modification event in the first preset event registry according to the target parameter in the parameter modification request, while initializing the first service; wherein the target parameter belongs to at least one first preset parameter; the first preset parameter loading method is a parameter loading method pre-configured in the first service; for each first preset parameter, a first preset parameter modification event corresponding to each first preset parameter is generated; wherein the first preset callback function corresponding to the first preset parameter modification event is the first preset parameter loading method corresponding to each first preset parameter; the target parameter modification event is the first preset parameter modification event corresponding to the target parameter in the first preset event registry; the target callback function is the first preset callback function corresponding to the target parameter modification event; the first preset parameter modification event is registered correspondingly to each first preset parameter, and a mapping relationship between the first preset parameter, the first preset parameter modification event and the first preset callback function is obtained as the first preset event registry.
[0204] In some embodiments, the first trigger part 2551 is also configured to, when receiving a parameter modification request through the preset parameter modification interface, call a preset event driven method pre-implemented in the preset parameter modification interface, and access the first preset event registry according to the target parameter; in the first preset event registry, determine the first preset parameter modification event corresponding to the target parameter as the target parameter modification event, and trigger the target parameter modification event through the preset event driven method.
[0205] In some embodiments, the first calling part 2552 is also configured to determine the target callback function corresponding to the target parameter modification event according to the first preset event registry; through the preset event driven method, the target callback function is called using the target parameter, the target parameter is passed into the target preset parameter loading method implemented in the target callback function, and the target parameter is loaded into the first service through the target prediction parameter loading method; the target preset parameter loading method is the first preset parameter loading method corresponding to the target parameter in at least one first preset parameter loading method; the at least one first preset parameter loading method is the preset parameter loading method corresponding to at least one first preset parameter in the first service.
[0206] In some embodiments, the first trigger part 2551 is also configured to access the remote storage space through the unified calling interface, and determine the target remote parameter from the at least one remote parameter according to the target parameter name of the target parameter; the remote storage space contains at least one storage type of sub-storage space; the unified calling interface is used to implement read and write operations on the at least one storage type of sub-storage space through a unified calling method; the target remote parameter is a shared parameter between the first service and the second service; the second service is used to synchronize the business data of the first service; the target remote parameter is updated using the target parameter, and the target parameter is synchronously updated to the second service.
[0207] In some embodiments, the first data processing device 255-1 also includes a first update part; the first update part is configured to update the first local target parameter corresponding to the target parameter in the first local storage according to the target parameter; the first local storage is the storage space on the first host where the first service is located.
[0208] The following is a description of an exemplary structure of the second data processing device 255-2 provided in the embodiment of the present disclosure, which is implemented as a software part. In some embodiments, Figure 3 As shown, the software part stored in the second data processing device 255-2 of the second memory 250-2 may include: a comparison part 2551, a second trigger part 2552, a second call part 2553 and a synchronization part 2554, wherein:
[0209] The comparison part 2551 is configured to compare the second local parameter of the second service in the second local storage with the second remote parameter in the remote storage space according to a preset time interval through a unified calling interface to obtain a comparison result; the second local storage is the storage space on the second host where the second service is located; the second remote parameter includes the shared parameters of the first service and the second service; the first service is used to record the game status of the game area;
[0210] The second triggering part 2552 is configured to determine the target parameter from the second remote parameter when the comparison result indicates that the second local parameter is inconsistent with the second remote parameter; and trigger the target parameter modification event corresponding to the target parameter name in the second preset event registration table according to the target parameter; the second preset event registration table indicates the mapping relationship between the second preset parameter name, the second preset parameter modification event and the second preset callback function in the second service;
[0211] The second calling part 2553 is configured to load the target parameter into the second service by calling the target callback function corresponding to the target parameter modification event;
[0212] The synchronization part 2554 is configured to run the second service and synchronize the first service based on the target parameter.
[0213] In some embodiments, the second data processing device 255-2 also includes: a second registration part, the second registration part is configured to, before triggering the target parameter modification event corresponding to the target parameter name in the second preset event registration table according to the target parameter, obtain the second preset event registration table based on at least one second preset parameter corresponding to the second service and at least one second preset parameter loading method corresponding to the at least one second preset parameter when initializing the second service; in the second preset event registration table, the at least one second preset parameter corresponds one-to-one to at least one second preset parameter modification event; each second preset parameter loading method in the at least one second preset parameter loading method is a callback function corresponding to each of the at least one second preset parameter modification events.
[0214] In some embodiments, the second data processing device 255-2 also includes: a second update part, the second update part is configured to read the target parameter from the remote storage space through the unified call interface after determining the target parameter from the second remote parameter; the remote storage space contains at least one storage type of sub-storage space; according to the target parameter, the second local target parameter corresponding to the target parameter in the first local storage is updated; the second local storage is the storage space on the second host where the second service is located.
[0215] It should be noted that the description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present disclosure, please refer to the description of the method embodiment of the present disclosure for understanding.
[0216] The embodiment of the present disclosure provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the data processing method described above in the embodiment of the present disclosure.
[0217] The present disclosure embodiment provides a computer-readable storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will be caused to execute the method provided by the present disclosure embodiment, for example, Figure 4-8 ,as well as Fig.10 , Fig.11 The method shown in .
[0218] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0219] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0220] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0221] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0222] In summary, through the embodiment of the present disclosure, when a parameter modification request is received, the corresponding target parameter modification event can be triggered according to the target parameter, and then as a response to the target parameter modification event, the corresponding target callback function is called to load the target parameter to the first service in real time, so that the first service can record the game state based on the value of the new target parameter, so that the callback function of the parameter modification event can be configured as a parameter loading method in the event registration table in advance, and the parameter modification request can be responded to through the event triggering mechanism, and the corresponding callback function can be called in real time to achieve the effect of immediate effect after the parameter change; and for the remote storage space composed of different types of storage devices in the actual scenario, the corresponding remote parameters in the remote storage space can be managed and updated indiscriminately through a unified calling interface, so as to achieve the parameter synchronization of at least one service, thereby greatly improving the efficiency of parameter configuration. In addition, the second service can quickly discover the parameter change event by regularly comparing the difference between the local parameters and the remote parameters, and synchronize the updated remote parameters to the local for loading in time through the event triggering response mechanism by pre-involving the event-driven model and pre-defining the events that need to be executed after the parameter change, so that the updated remote parameters in the remote storage space can take effect in real time, improving the efficiency of parameter configuration. And through the unified calling interface, unified abstraction of read and write operations of different types of sub-storage spaces is achieved, so that the service can manage the system configuration parameters of each storage location without distinction, thereby improving the efficiency and maintainability of parameter configuration.
[0223] The above description is only an embodiment of the present disclosure and is not intended to limit the protection scope of the present disclosure. Any modification, equivalent replacement and improvement made within the spirit and scope of the present disclosure are included in the protection scope of the present disclosure.
Claims
1. A data processing method, include: In case of receiving a parameter modification request for a first service being provided, triggering a target parameter modification event in a first preset event registration table according to a target parameter in the parameter modification request; And updating the remote parameters corresponding to the target parameters in the remote storage space through a unified calling interface; The first preset event registration table represents a mapping relationship between a first preset parameter, a first preset parameter modification event and a first preset callback function in the first service; The remote storage space is used to store at least one remote parameter of at least one service; The first preset parameters include at least: camera angle, game participant information, heat map, game rules, and network configuration parameters of the server itself; Using the target parameter, calling the target callback function corresponding to the target parameter modification event, and loading the target parameter into the first service; Running the first service, and recording a game state of the game area based on the target parameter; The method of, upon receiving a parameter modification request for a first service being provided, triggering a target parameter modification event in a first preset event registration table according to a target parameter in the parameter modification request, includes: When receiving a parameter modification request through a preset parameter modification interface, calling a preset event driven method pre-implemented in the preset parameter modification interface, and accessing the first preset event registration table according to the target parameter; In the first preset event registration table, a first preset parameter modification event corresponding to the target parameter is determined as the target parameter modification event, and the target parameter modification event is triggered by the preset event driving method.
2. The method according to claim 1, in, Before triggering a target parameter modification event in a first preset event registration table according to the target parameter in the parameter modification request, the method further includes: In the case of initializing the first service, obtaining at least one first preset parameter corresponding to the first service and a first preset parameter loading method corresponding to each first preset parameter in the at least one first preset parameter; wherein the target parameter belongs to at least one first preset parameter; and the first preset parameter loading method is a parameter loading method preconfigured in the first service; For each of the first preset parameters, a first preset parameter modification event corresponding to each of the first preset parameters is generated; wherein the first preset callback function corresponding to the first preset parameter modification event is the first preset parameter loading method corresponding to each of the first preset parameters; the target parameter modification event is the first preset parameter modification event corresponding to the target parameter in the first preset event registry; the target callback function is the first preset callback function corresponding to the target parameter modification event; The first preset parameter modification event is correspondingly registered on each of the first preset parameters to obtain a mapping relationship between the first preset parameter, the first preset parameter modification event and the first preset callback function as the first preset event registration table.
3. The method according to claim 1, in, The using the target parameter, calling the target callback function corresponding to the target parameter modification event, and loading the target parameter into the first service includes: Determining a target callback function corresponding to the target parameter modification event according to the first preset event registration table; Through the preset event-driven method, the target callback function is called using the target parameter, the target parameter is passed into the target preset parameter loading method implemented in the target callback function, and the target parameter is loaded into the first service through the target prediction parameter loading method; the target preset parameter loading method is the first preset parameter loading method corresponding to the target parameter in at least one first preset parameter loading method; the at least one first preset parameter loading method is the preset parameter loading method corresponding to at least one first preset parameter in the first service.
4. The method according to claim 1 or 2, in, The updating of the remote parameters corresponding to the target parameters in the remote storage space through the unified calling interface includes: The remote storage space is accessed through the unified calling interface, and a target remote parameter is determined from the at least one remote parameter according to the target parameter name of the target parameter; the remote storage space includes a sub-storage space of at least one storage type; the unified calling interface is used to implement read and write operations on the sub-storage space of at least one storage type through a unified calling method; the target remote parameter is a shared parameter of the first service and the second service; the second service is used to synchronize the business data of the first service; The target remote parameters are updated using the target parameters, and the target parameters are synchronously updated to the second service.
5. The method according to claim 1 or 2, in, The method further comprises: According to the target parameter, a first local target parameter corresponding to the target parameter in a first local storage is updated; the first local storage is a storage space on a first host where the first service is located.
6. A data processing method, include: According to a preset time interval, a second local parameter of the second service in the second local storage is compared with a second remote parameter in the remote storage space through a unified calling interface to obtain a comparison result; the second local storage is a storage space on the second host where the second service is located; the second remote parameter includes a shared parameter of the first service providing the service and the second service; the first service is used to record the game status of the game area; When the comparison result indicates that the second local parameter is inconsistent with the second remote parameter, determining a target parameter from the second remote parameter; And according to the target parameter, triggering a target parameter modification event corresponding to the target parameter name in the second preset event registration table; The second preset event registration table represents a mapping relationship between a second preset parameter name, a second preset parameter modification event and a second preset callback function in the second service; Loading the target parameter into the second service by calling the target callback function corresponding to the target parameter modification event; The second service is run, and based on the target parameter, the current business state and business data of the first service are synchronized to the second service, so as to synchronize the first service.
7. The method according to claim 6, in, Before triggering the target parameter modification event corresponding to the target parameter name in the second preset event registration table according to the target parameter, the method further includes: When the second service is initialized, the second preset event registration table is obtained based on at least one second preset parameter corresponding to the second service and at least one second preset parameter loading method corresponding to the at least one second preset parameter; in the second preset event registration table, the at least one second preset parameter corresponds one-to-one to at least one second preset parameter modification event; each second preset parameter loading method in the at least one second preset parameter loading method is a callback function corresponding to each of the at least one second preset parameter modification events.
8. The method according to claim 6 or 7, in, After determining the target parameter from the second remote parameter, the method further includes: The target parameter is read from the remote storage space through the unified calling interface; the remote storage space includes a sub-storage space of at least one storage type; According to the target parameter, a second local target parameter corresponding to the target parameter in the first local storage is updated; the second local storage is a storage space on the second host where the second service is located.
9. A first host, in, include: A first memory, used to store executable instructions; A first processor is configured to execute the executable instructions stored in the first memory to: In case of receiving a parameter modification request for a first service being provided, triggering a target parameter modification event in a first preset event registration table according to a target parameter in the parameter modification request; And updating the remote parameters corresponding to the target parameters in the remote storage space through a unified calling interface; The first preset event registration table represents a mapping relationship between a first preset parameter, a first preset parameter modification event and a first preset callback function in the first service; The remote storage space is used to store at least one remote parameter of at least one service; The first preset parameters include at least: camera angle, game participant information, heat map, game rules, and network configuration parameters of the server itself; Using the target parameter, calling the target callback function corresponding to the target parameter modification event, and loading the target parameter into the first service; Running the first service, and recording a game state of the game area based on the target parameter; When a parameter modification request for a first service being provided is received, and a target parameter modification event in a first preset event registration table is triggered according to a target parameter in the parameter modification request, the first processor is configured to: When receiving a parameter modification request through a preset parameter modification interface, calling a preset event driven method pre-implemented in the preset parameter modification interface, and accessing the first preset event registration table according to the target parameter; In the first preset event registration table, a first preset parameter modification event corresponding to the target parameter is determined as the target parameter modification event, and the target parameter modification event is triggered by the preset event driving method.
10. The first host according to claim 9, in, Before triggering a target parameter modification event in a first preset event registration table according to the target parameter in the parameter modification request, the first processor is configured to: In the case of initializing the first service, obtaining at least one first preset parameter corresponding to the first service and a first preset parameter loading method corresponding to each first preset parameter in the at least one first preset parameter; wherein the target parameter belongs to at least one first preset parameter; and the first preset parameter loading method is a parameter loading method preconfigured in the first service; For each of the first preset parameters, a first preset parameter modification event corresponding to each of the first preset parameters is generated; wherein the first preset callback function corresponding to the first preset parameter modification event is the first preset parameter loading method corresponding to each of the first preset parameters; the target parameter modification event is the first preset parameter modification event corresponding to the target parameter in the first preset event registry; the target callback function is the first preset callback function corresponding to the target parameter modification event; The first preset parameter modification event is correspondingly registered on each of the first preset parameters to obtain a mapping relationship between the first preset parameter, the first preset parameter modification event and the first preset callback function as the first preset event registration table.
11. The first host according to claim 9, in, When the target parameter is used to call the target callback function corresponding to the target parameter modification event and load the target parameter into the first service, the first processor is configured as follows: Determining a target callback function corresponding to the target parameter modification event according to the first preset event registration table; The target callback function is called using the target parameter through the preset event-driven method, the target parameter is passed into the target preset parameter loading method implemented in the target callback function, and the target parameter is loaded into the first service through the target prediction parameter loading method; The target preset parameter loading method is a first preset parameter loading method corresponding to the target parameter in at least one first preset parameter loading method; The at least one first preset parameter loading method is a preset parameter loading method corresponding to at least one first preset parameter in the first service.
12. The first host according to claim 9 or 10, in, When updating the remote parameter corresponding to the target parameter in the remote storage space through the unified calling interface, the first processor is configured as follows: The remote storage space is accessed through the unified calling interface, and a target remote parameter is determined from the at least one remote parameter according to the target parameter name of the target parameter; the remote storage space includes a sub-storage space of at least one storage type; the unified calling interface is used to implement read and write operations on the sub-storage space of at least one storage type through a unified calling method; the target remote parameter is a shared parameter of the first service and the second service; the second service is used to synchronize the business data of the first service; The target remote parameters are updated using the target parameters, and the target parameters are synchronously updated to the second service.
13. The first host according to claim 9 or 10, in, The first processor is further configured to: According to the target parameter, a first local target parameter corresponding to the target parameter in a first local storage is updated; the first local storage is a storage space on a first host where the first service is located.
14. A second host, in, include: A second memory, used for storing executable instructions; a second processor, configured to execute the executable instructions stored in the second memory to: According to a preset time interval, a second local parameter of the second service in the second local storage is compared with a second remote parameter in the remote storage space through a unified calling interface to obtain a comparison result; the second local storage is a storage space on the second host where the second service is located; the second remote parameter includes a shared parameter of the first service providing the service and the second service; the first service is used to record the game status of the game area; When the comparison result indicates that the second local parameter is inconsistent with the second remote parameter, determining a target parameter from the second remote parameter; And according to the target parameter, triggering a target parameter modification event corresponding to the target parameter name in the second preset event registration table; The second preset event registration table represents a mapping relationship between a second preset parameter name, a second preset parameter modification event and a second preset callback function in the second service; Loading the target parameter into the second service by calling the target callback function corresponding to the target parameter modification event; The second service is run, and based on the target parameter, the current business state and business data of the first service are synchronized to the second service, so as to synchronize the first service.
15. The second host according to claim 14, in, Before triggering the target parameter modification event corresponding to the target parameter name in the second preset event registration table according to the target parameter, the second processor is further configured to: In the case of initializing the second service, obtaining the second preset event registration table based on at least one second preset parameter corresponding to the second service and at least one second preset parameter loading method corresponding to the at least one second preset parameter; In the second preset event registration table, the at least one second preset parameter corresponds one-to-one to at least one second preset parameter modification event; each second preset parameter loading method in the at least one second preset parameter loading method is a callback function corresponding to each of the at least one second preset parameter modification events.
16. The second host according to claim 14 or 15, wherein after determining the target parameter from the second remote parameter, the second processor is further configured to: The target parameter is read from the remote storage space through the unified calling interface; the remote storage space includes a sub-storage space of at least one storage type; According to the target parameter, a second local target parameter corresponding to the target parameter in the first local storage is updated; the second local storage is a storage space on the second host where the second service is located.
17. A computer-readable storage medium, in, Executable instructions are stored, for being executed by the first processor to: In case of receiving a parameter modification request for a first service being provided, triggering a target parameter modification event in a first preset event registration table according to a target parameter in the parameter modification request; And updating the remote parameters corresponding to the target parameters in the remote storage space through a unified calling interface; The first preset event registration table represents a mapping relationship between a first preset parameter, a first preset parameter modification event and a first preset callback function in the first service; The remote storage space is used to store at least one remote parameter of at least one service; The first preset parameters include at least: camera angle, game participant information, heat map, game rules, and network configuration parameters of the server itself; Using the target parameter, calling the target callback function corresponding to the target parameter modification event, and loading the target parameter into the first service; Running the first service, and recording a game state of the game area based on the target parameter; The method of, upon receiving a parameter modification request for a first service being provided, triggering a target parameter modification event in a first preset event registration table according to a target parameter in the parameter modification request, includes: When receiving a parameter modification request through a preset parameter modification interface, calling a preset event driven method pre-implemented in the preset parameter modification interface, and accessing the first preset event registration table according to the target parameter; In the first preset event registration table, a first preset parameter modification event corresponding to the target parameter is determined as the target parameter modification event, and the target parameter modification event is triggered by the preset event driving method.
18. A computer-readable storage medium, in, Executable instructions are stored, for being executed by the second processor to: According to a preset time interval, a second local parameter of the second service in the second local storage is compared with a second remote parameter in the remote storage space through a unified calling interface to obtain a comparison result; the second local storage is a storage space on the second host where the second service is located; the second remote parameter includes a shared parameter of the first service providing the service and the second service; the first service is used to record the game status of the game area; When the comparison result indicates that the second local parameter is inconsistent with the second remote parameter, determining a target parameter from the second remote parameter; And according to the target parameter, triggering a target parameter modification event corresponding to the target parameter name in the second preset event registration table; The second preset event registration table represents a mapping relationship between a second preset parameter name, a second preset parameter modification event and a second preset callback function in the second service; Loading the target parameter into the second service by calling the target callback function corresponding to the target parameter modification event; The second service is run, and based on the target parameter, the current business state and business data of the first service are synchronized to the second service, so as to synchronize the first service.
Citation Information
Patent Citations
Multiprocessing system with automated propagation of changes to centrally maintained configuration settings
US6334178B1
