Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
The technical scheme of the data processing method and the like provided by the embodiment of the application relates to cloud technology, in particular to database application based on technologies such as cloud computing and cloud storage.
Cloud technology refers to a hosting technology for unifying serial resources such as hardware, software, network and the like in a wide area network or a local area network to realize calculation, storage, processing and sharing of data. Cloud technology (Cloud technology) is a generic term of network technology, information technology, integration technology, management platform technology, application technology and the like based on Cloud computing business model application, can form a resource pool, is used as required, and is flexible and convenient. Background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture-like websites and more web portals. With the high development and application of the internet industry, each article may have its own identification mark and needs to be transmitted to a background system for logic processing, data in different levels are processed separately, and various industrial data need strong system background support and can only be realized through cloud computing.
Cloud Computing (Cloud Computing) is a Computing model that distributes Computing tasks over a resource pool of large numbers of computers, enabling various application systems to obtain Computing power, storage space, and information services as needed. The network that provides the resources is referred to as the "cloud". Resources in the "cloud" appear to the user as being infinitely expandable and available at any time, available on demand, expandable at any time, and paid for on-demand. As a basic capability provider of cloud computing, a cloud computing resource pool (cloud platform for short) generally called as an Infrastructure as a Service (IaaS) platform is established, and multiple types of virtual resources are deployed in the resource pool and are selectively used by external clients. The cloud computing resource pool mainly comprises: computing devices (which are virtualized machines, including operating systems), storage devices, and network devices.
A distributed Cloud Storage (hereinafter, referred to as a Storage system) refers to a Storage system that integrates a large number of Storage devices (Storage devices are also referred to as Storage nodes) of different types in a network through application software or an application interface to cooperatively work by using functions such as cluster application, a grid technology, and a distributed Storage file system, and provides a data Storage function and a service access function to the outside.
At present, a storage method of a storage system is as follows: logical volumes are created, and when created, each logical volume is allocated physical storage space, which may be the disk composition of a certain storage device or of several storage devices. The client stores data on a certain logical volume, namely, the data is stored on a file system, the file system divides the data into a plurality of parts, each part is an object, the object not only contains the data but also contains additional information such as data Identification (ID), etc., the file system respectively writes each object into a physical storage space of the logical volume, and the file system records storage location information of each object, so that when the client requests to access the data, the file system can enable the client to access the data according to the storage location information of each object.
The process of allocating physical storage space for the logical volume by the storage system specifically includes: physical storage space is divided in advance into stripes according to a group of capacity measures of objects stored in a logical volume (the measures often have a large margin with respect to the capacity of the actual objects to be stored) and Redundant Array of Independent Disks (RAID), and one logical volume can be understood as one stripe, thereby allocating physical storage space to the logical volume. With the development of diversification of internet, real-time data stream and connecting equipment and the promotion of demands of search service, social network, mobile commerce, open collaboration and the like, cloud computing is rapidly developed. Different from the prior parallel distributed computing, the generation of cloud computing can promote the revolutionary change of the whole internet mode and the enterprise management mode in concept.
The Database (Database) can be regarded as an electronic file cabinet, i.e., a place for storing electronic files, and a user can add, query, update, delete and the like to the data in the files. A "database" is a collection of data that is stored together in a manner that can be shared by multiple users, has as little redundancy as possible, and is independent of the application.
A Database Management System (DBMS) is a computer software System designed for managing a Database, and generally has basic functions of storage, interception, security assurance, backup, and the like. The database management system may be categorized according to the database model it supports, such as relational, XML (Extensible Markup Language); or classified according to the type of computer supported, e.g., server cluster, mobile phone; or classified according to the Query Language used, such as SQL (Structured Query Language), XQuery; or by performance impulse emphasis, e.g., maximum size, maximum operating speed; or other classification schemes. Regardless of the manner of classification used, some DBMSs are capable of providing database management services across categories, e.g., supporting multiple query languages simultaneously.
Distributed storage refers to the scattered storage of data on a plurality of independent devices, in order to improve the reliability and usability of the whole system and to achieve flexible expansion. For a partitioned network game, the deployment of game partitions and partition servers naturally has a distributed nature, which also exists for the database storage of each partition server. Although the difficulty of aggregating data is increased by performing distributed storage of data based on the partitioned servers, the distributed structure naturally allows the logic of data collection to be accompanied by the advantage of distribution, and the performance and efficiency of collecting data as a whole become higher.
Fig. 1 schematically shows a block diagram of an exemplary system architecture to which the solution of the present application applies.
As shown in fig. 1, system architecture 100 may include a terminal device 110, a network 120, and a server 130. The terminal device 110 may include various electronic devices such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, and the like. The server 130 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like. Network 120 may be a communication medium of various connection types capable of providing a communication link between terminal device 110 and server 130, such as a wired communication link or a wireless communication link.
The system architecture in the embodiments of the present application may have any number of terminal devices, networks, and servers, according to implementation needs. For example, the server 130 may be a server group composed of a plurality of server devices. In addition, the technical solution provided in the embodiment of the present application may be applied to the terminal device 110, or may be applied to the server 130, or may be implemented by both the terminal device 110 and the server 130, which is not particularly limited in this application.
Taking a mass Multiplayer Online Role Playing Game MMORPG (Massively Multiplayer Online Role Playing Game) as an example, a player needs to play a fictional Role in the Game, and completes many activities alone or together with other players. A user may register and log in a game account through a game client installed on the terminal device 110, and when logging in a game, the user needs to select a game partition and specifically select a partition server from the game partitions to play the game. Fig. 2 is a schematic diagram illustrating an interface for selecting a game server in an application scenario according to an embodiment of the present application. As shown in fig. 2, a plurality of game sections 202, for example, a Xuanyuan 1 section, a Xuanyuan 2 section, a Xuanyuan 6 section, are provided in the login interface 201, and are sequentially divided according to the sequence of section creation time. With accumulation of game users and update of game contents, new game partitions can be added according to actual needs.
When a user selects one of the game partitions, the partition server 203 included in the game partition may be expanded and displayed in the login interface 201. For example, when the user selects the "Xuanyuan 5 zone", the "shanhai 41 zone", the "shanhai 42 zone", the "… …" shanhai 50 zone "included in the game zone may be expanded and displayed on the right side of the login interface 201. The user may continue to select one of the partitioned servers from which to enter the game space for the gaming activity.
In the traditional partitioned server game architecture scheme, message routing forwarding for a specified user can only occur in the same partitioned server. In other words, a user logged into a partition server can only play game interactions with other users logged into the same partition server, and cannot directly interact with users of other partition servers. In order to implement the cross-server functions such as cross-server team formation, cross-server session and the like, when a relevant service request is sent, the server ID of the partition server where the other party is located is acquired, and the service request is forwarded to the corresponding partition server based on the server ID, so that the partition server where the other party is located performs processing. Such a scheme strongly depends on the server ID, and when the server ID cannot be acquired or changes, fatal damage is caused to the routing system, and the routing system cannot serve. For example, if the server ID is saved when a relationship is established between a user and a user, when the server ID of the user changes, updating of related data becomes a difficult problem; if the server ID of the user cannot be acquired or an incorrect server ID is acquired, the message cannot be routed; if the ID of the server where the user is currently located actually changes (for example, after the servers are merged, the ID of the server where the user is actually located changes), then a message routing failure may occur.
Aiming at the problem of poor data communication reliability caused by the dependence on server ID in the related art, the embodiment of the application provides a solution for initiating data communication routing for unknown server users. For the service requester, the actual use effect is consistent with the use of the whole-area service mode, and the server ID does not need to be concerned. Fig. 3 shows a block diagram of a server architecture in an application scenario according to an embodiment of the present application. As shown in fig. 3, the overall server architecture includes three layers of a central server 301, a server isolation layer 302 and a partition server 303, and taking a network game as an example, the central server 301 provides global services of the whole game, including services such as a global leaderboard, a game anchor, a game team, a global robot, a monitoring collection, and short videos. The server isolation layer 302 is used to isolate services of game servers corresponding to different terminal devices, for example, server isolation may be performed on a terminal device of an Android system and a terminal device of an IOS system. In addition, the server isolation layer 302 may also implement the function of matching game users across servers within the scope of the partial game partition.
The zone server 303 is used to provide users with actual game space services that cover 70% of the total game volume, such as user account log-in/out, map allocation management, mobile combat, pick-up transactions, mail processing, etc. In other application scenarios, the central server 301 page may communicate data directly with each of the partitioned servers 303, thereby diluting or eliminating the isolation function of the server isolation layer 302.
The following detailed description is provided to technical solutions of a data processing method, a data processing apparatus, a computer readable medium, and an electronic device provided in the present application, with reference to specific embodiments.
FIG. 4 is a flow chart illustrating steps of a data processing method in one embodiment of the present application, which may be performed by one of the partitioned servers shown in FIG. 3 to enable data communication with or across the servers. As shown in fig. 4, the data processing method may mainly include steps S410 to S430.
In step S410, a service processing request triggered by the first service agent on the current server is obtained.
The current server refers to a partition server where the first service agent is currently logged in, and the first service agent can execute different service operations on the current server by taking other service agents as service objects to trigger corresponding service processing requests. Taking a game service in an online game as an example, a first service body serving as a certain virtual game role in the online game can interact with virtual game roles corresponding to other service bodies, such as applying for adding game friends, inviting game teams, giving gifts, and the like.
In step S420, it is determined whether a second service agent corresponding to the service processing request exists on the current server according to the agent identification information carried in the service processing request.
The service processing request carries the main body identification information of the corresponding service object, and the main body identification information is the distinguishing identification of the second service main body and is used for determining the execution target of the service processing request. Still taking the game service in the network game as an example, the body identification information may be an account ID generated when the user registers a game account; the second business entity can be a virtual game character in the network game or a game character set (such as a team, a party, a family and the like) consisting of a plurality of virtual game characters.
FIG. 5 is a flowchart illustrating the steps for querying a second business entity through a partitioned data routing process on a current server in one embodiment of the present application. As shown in fig. 5, the method for determining whether a second service agent corresponding to the service processing request exists on the current server according to the agent identification information carried in the service processing request may include steps S510 to S540.
In step S510, the service processing request is forwarded from the current service process to a partition data routing process running on the current server, where the partition data routing process is configured to perform data collection on a service agent existing on the current server to maintain a partition agent database corresponding to the current server.
The method comprises the steps that a service process and a partition data routing process can be simultaneously operated on a current server, wherein the service process is a main process for processing various service requests on the current server; the partition data routing process is used for updating and maintaining a partition main body database on the current server, and can perform routing distribution processing on data related to the service request according to the content of the database.
In one embodiment of the present application, the service agent currently existing on the server may include at least one of a registration service agent and a login service agent. The registered business main body is a business main body for registering an account on the current server, and the login business main body is a business main body for logging in the account on the current server.
In some optional embodiments, the partition data routing process may perform data collection on a service principal whose account is currently registered on the server, obtain brief information of the relational data related to the service principal, and store the brief information in the partition principal database after associating the brief information with the principal identification information of the service principal. The brief information at least includes the server identification information of the current server of the business agent registration account, and the server identification information is used as the distinguishing identification of each partition server and is used for determining the partition server of the business agent registration account. In addition, the brief information of the relational data related to the business entity in the partition entity database may further include other related business data, for example, a certain business entity is a virtual game character in the online game, and the relational data related thereto may include information such as a character name, a gender, and an occupational attribute associated with the identity information of the certain business entity.
In some other alternative embodiments, the partition data routing process may perform data collection on the service entity that logs in the account on the current server, obtain the brief information of the relational data related to the service entity, and store the brief information in the partition entity database after associating the brief information with the entity identification information of the service entity. The brief information at least includes the server identification information of the current server of the business entity login account.
In addition, in some alternative embodiments, the partitioned data routing process may collect data for both the business entity of the registered account and the business entity of the logged-in account on the current server. On the basis, the business main bodies which are registered on other partition servers in a primary mode on the current server or the business main bodies which are registered on other partition servers in a cross-server login mode are included in the data collection range of the partition main body database, and therefore the same business processing effect is achieved for the business main bodies in the cross-server login mode and the business main bodies in the local server login mode on the current server.
In an embodiment of the present application, the current server may monitor a login state of a service agent logged in the current server, and update the partition agent database on the current server according to the login state. Meanwhile, the updated data of the partition main body database can be sent to the central server, so that the central server can perform data synchronization. Each partition server communicated with the central server can synchronize the real-time update data of the partition main body database to the central server, so that the accuracy of service data processing is guaranteed.
In step S520, the partition data routing process obtains the main body identification information carried in the service processing request, and queries whether a service main body matching the main body identification information exists in the partition main body database.
In one embodiment of the present application, the partition master database may include a first partition database located in the memory of the current server and a second partition database located in the disk of the current server. The method for inquiring whether the service main body matched with the main body identification information exists in the partition main body database can comprise the following steps: inquiring whether a service main body matched with the main body identification information exists in a first partition database; and if the business body matched with the body identification information is not inquired in the first partition database, inquiring whether the business body matched with the body identification information exists in the second partition database. The first partition database may be, for example, data caching middleware such as Redis, MemCache, or the like, and the second partition database may be, for example, a disk database such as Oracle, Mysql, or the like, which is written in a server disk. The service data of the service subject monitored on the current server can be firstly cached in the first partition database, and when the preset data storage condition is met, the cached data in the first partition database is written into the second partition database in the disk. The data storage condition may be a time condition or a data amount condition, for example, writing the cache data in the first partitioned database to the disk at intervals of a preset time, or writing the cache data in the first partitioned database to the disk when the data amount of the cache data in the first partitioned database reaches a preset threshold.
In step S530, if the service agent matching the agent identification information is found in the partition agent database, the service agent is used as a second service agent corresponding to the service processing request.
In step S540, if the service agent matching the agent identification information is not queried in the partition agent database, it is determined that a second service agent corresponding to the service processing request does not exist on the current server.
The partition main body database stores the associated data of the service main body existing on the current server, the main body identification information is used as a key word to query in the partition main body database, and whether a second service main body serving as a service request object exists on the current server can be determined according to a query result.
Based on the above steps S510 to S540, if the corresponding second service agent is queried in the partition agent database of the current server, the service processing request may be directly responded to by the current server; if the corresponding second service body is not inquired, the service request object corresponding to the service processing request is the service body on other partition servers, the service processing request is a cross-service request, and the request can be forwarded through the central server.
In step S430, if the second service agent does not exist on the current server, the service processing request is sent to a central server in communication connection with the current server, so that the service processing request is forwarded to a target server where the second service agent is located through the central server.
In one embodiment of the present application, a special process may be started on the central server for processing the forwarding route of the service processing request. Fig. 6 is a flowchart illustrating steps of a method for forwarding a request by a central server according to an embodiment of the present application. As shown in fig. 6, on the basis of the above embodiment, the forwarding the service processing request to the target server where the second service agent is located through the central server in step S430 may include steps S610 to S630 as follows.
Step S610: and forwarding the service processing request to a global data routing process running on the central server, wherein the global data routing process is used for collecting data of the partitioned servers in communication connection with the central server so as to maintain a global main database corresponding to the central server.
Step S620: and acquiring the main body identification information carried in the service processing request through the global data routing process, and inquiring whether a server matched with the main body identification information exists in a global main body database.
Step S630: and if the server matched with the main body identification information is inquired in the global main body database, taking the server as a target server where the second business main body is located and forwarding the business processing request to the target server.
On the central server, the global main body database can be updated and maintained through a global data routing process, and the global main body database can be obtained by performing data synchronization on the partition main body databases in each partition server. In the global agent database, agent identification information of the service agent and server identification information of the partition server where the service agent is located may be stored. Based on the incidence relation between the main body identification information and the server identification information, the partition server matched with the main body identification information can be inquired in the global main body database according to the main body identification information, and therefore the inquired partition server is determined as the target server where the second service main body is located.
FIG. 7 illustrates a block diagram of a data routing architecture in one embodiment of the present application. As shown in fig. 7, a global data routing process 711 is running on central server 710, and is used to collect data from each partitioned server 720 and maintain and update global subject database 712 based on the collected data. On the partition server 720, a partition data routing process 721 is running, which is used to collect data of the business entity on the server, and maintain and update the partition entity database 722 based on the collected data, so as to synchronize the update data of the partition entity database 722 with the central server 710.
In one embodiment of the present application, the global subject database includes a first global database located in the memory of the central server and a second global database located in the disk of the central server. The method for querying whether a server matched with the subject identification information exists in the global subject database can comprise the following steps: inquiring whether a server matched with the main body identification information exists in a first global database; and if the server matched with the main body identification information is not inquired in the first global database, inquiring whether a server matched with the main body identification information exists in the second global database. The first global database may be, for example, data caching middleware such as Redis, MemCache, and the like, and the second global database may be, for example, a disk database such as Oracle, Mysql, and the like, which is written in a server disk. The data synchronized by the partition servers acquired on the central server can be firstly cached in the first global database, and when the preset data storage condition is met, the data cached in the first global database is written into the second global database in the disk. The data storage condition may be a time condition or a data amount condition, for example, writing the cache data in the first partitioned database to the disk at intervals of a preset time, or writing the cache data in the first partitioned database to the disk when the data amount of the cache data in the first partitioned database reaches a preset threshold.
In one embodiment of the application, if a server matched with the subject identification information is not queried in the global subject database, sending a data synchronization request to a partition server in communication connection with the central server; and acquiring synchronous data returned to the central server by the partition servers, and inquiring whether a server matched with the main body identification information exists in the synchronous data. When the partition server receives the data synchronization request sent by the central server, whether the time node from the last data synchronization exceeds the shortest synchronization period or not can be judged. If the minimum synchronization period has been exceeded, the newly generated data that has not been synchronized can be synchronized with the central server. If the shortest synchronization period is not exceeded, no response can be made to the data synchronization request, so that excessive computing resources and network resources are prevented from being occupied due to too frequent data synchronization.
In an embodiment of the application, after the central server forwards the service processing request to the target server where the second service agent is located, the target server may further obtain service response data corresponding to the service processing request, and then return the service response data to the current server where the first service agent is located.
The service response data may be processed by one or more of the target server and a target client communicatively coupled to the target server for different types of service processing requests. When the target server receives the service processing request, the service type of the service processing request may be detected first, where the service type includes a bidirectional service request requiring the second service agent to respond and a unidirectional service request not requiring the second service agent to respond. And if the service type of the service processing request is detected to be a bidirectional service request, forwarding the service processing request to a target client corresponding to the second service main body through the target server to acquire service response data generated after the target client responds to the service processing request. And if the service type of the service processing request is detected to be the one-way service request, responding the service processing request through the target server and then generating service response data. For example, the two-way service request may include a request for adding a friend in a network game and a request for a session between friends, etc., and the one-way service request may include a request for viewing information, a request for gifting a gift, etc.
In one embodiment of the present application, a method for detecting a service type of a service processing request may include: forwarding the service processing request to a service process running on the target server through a partitioned data routing process running on the target server; and detecting the service type of the service processing request through the service process.
In an embodiment of the present application, the service response data may be returned in an original route according to a sending path of the service processing request, that is, the method for returning the service response data to the current server where the first service agent is located may include: and forwarding the service response data to the central server through the target server, and forwarding the service response data to the current server where the first service main body is located through the central server.
In another embodiment of the present application, the service response data may also be returned by using a temporarily established communication link, that is, the method for returning the service response data to the current server where the first service agent is located may include: establishing a communication link with preset effective duration between a target server and a current server where a first service main body is located; and transmitting the service response data from the target server to the current server based on the communication link.
The embodiment of the application can be applied to the MMORPG game involving more game partitions. For example, when a player performs a cross-server playing method at a client, an invitation for adding friends can be sent to a cross-server player encountered in a game process, at this time, the client sends a friend adding application to a server, and after receiving the application, the server finds that the target player and the current player do not belong to the same partition server, so that a request message is accurately delivered to the partition server where the target player is located according to the technical scheme provided by the embodiment of the application, and then the request message is sent to the client of the target player, and after the target player processes the request, the request message is returned to the player client of the request initiator according to the same link.
When a player checks family information, a family information checking request is sent to a server, and the server finds that a target family is not on a current server after inquiring, according to the technical scheme provided by the embodiment of the application, the target server where the family is located can be found through the central server, the message is forwarded to the target server where the target family is located, and after the target server inquires data of the family, the reply data can be forwarded to the requested player client side for display.
Fig. 8 is a schematic diagram illustrating a message routing process in an application scenario involving a game scenario in which a player performs a cross-server session in a network game according to an embodiment of the present application. As shown in fig. 8, when a first user 801 logged in to a first partitioned server initiates a session request to a second user 802 of the same server or a different server, the session request is first sent to a first business process 803 running on the first partitioned server by a client where the first user 801 is located. The first business process 803 forwards the session request to a first partitioned data routing process 804 running on the first partitioned server, and the first partitioned data routing process 804 queries to determine whether the second user 802 is a registered user or a logged-on user on the first partitioned server. When it is determined based on the query results that the second user 802 is not at the first partitioned server, the session request may be forwarded to a global data routing process 805 running on the central server. The global data routing process 805, after querying, may determine that the server where the second user 802 is located is the second partition server, and may forward the session request to the second partition data routing process 806 running on the second partition server. The second partition data routing process 806 forwards the received session request to a second service process 807 running on the second partition server, and finally, the second service process 807 sends the session request to the client where the second user 802 is located, so as to implement the cross-service session between the first user 801 and the second user 802.
In the technical solution provided in the embodiment of the present application, by configuring a server architecture network of a central server and a partition server, main data of each partition can be collected on the partition server, and server data is summarized on the central server, so that data routing forwarding in a global scope is achieved.
It should be noted that although the various steps of the methods in this application are depicted in the drawings in a particular order, this does not require or imply that these steps must be performed in this particular order, or that all of the shown steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
The following describes embodiments of an apparatus of the present application, which may be used to perform the data processing method in the above-described embodiments of the present application. Fig. 9 schematically shows a block diagram of a data processing apparatus according to an embodiment of the present application. As shown in fig. 9, the data processing apparatus 900 may mainly include: a request obtaining module 910, configured to obtain a service processing request triggered by a first service agent on a current server; a main body query module 920, configured to determine whether a second service main body corresponding to the service processing request exists on the current server according to the main body identification information carried in the service processing request; the request forwarding module 930 is configured to, if the second service agent does not exist on the current server, send the service processing request to a central server in communication connection with the current server, so as to forward the service processing request to a target server where the second service agent is located through the central server.
In some embodiments of the present application, based on the above technical solutions, the main body query module 920 includes: the process forwarding unit is configured to forward the service processing request to a partition data routing process running on the current server from the current service process, and the partition data routing process is used for collecting data of a service main body existing on the current server so as to maintain a partition main body database corresponding to the current server; the main body query unit is configured to acquire the main body identification information carried in the service processing request through the partitioned data routing process and query whether a service main body matched with the main body identification information exists in a partitioned main body database; a first result determination unit configured to, if a service agent matching the agent identification information is queried in the partition agent database, take the service agent as a second service agent corresponding to the service processing request; and the second result determining unit is configured to determine that a second service subject corresponding to the service processing request does not exist on the current server if the service subject matched with the subject identification information is not inquired in the partition subject database.
In some embodiments of the present application, based on the above technical solutions, the service agent existing on the current server includes a registration service agent and a login service agent; the registered business main body is a business main body for registering an account on the current server, and the login business main body is a business main body for logging in the account on the current server; the data processing apparatus 900 further comprises: the state monitoring module is configured to monitor the login state of the business body on the current server; the data updating module is configured to update the partition main body database on the current server according to the login state; and the data synchronization module is configured to send the updated data of the partition main body database to the central server so as to enable the central server to perform data synchronization.
In some embodiments of the present application, based on the above technical solution, the partition subject database includes a first partition database located in a memory of the current server and a second partition database located in a disk of the current server; the main body inquiry unit includes: a first main body query subunit configured to query whether a service main body matching the main body identification information exists in the first partition database; and the second main body query subunit is configured to query whether the service main body matched with the main body identification information exists in the second partition database if the service main body matched with the main body identification information is not queried in the first partition database.
In some embodiments of the present application, based on the above technical solution, the request forwarding module 930 includes: the first forwarding unit is configured to forward the service processing request to a global data routing process running on the central server, and the global data routing process is used for performing data collection on a partition server in communication connection with the central server so as to maintain a global main database corresponding to the central server; the server query unit is configured to acquire the main body identification information carried in the service processing request through a global data routing process and query whether a server matched with the main body identification information exists in a global main body database; and the second forwarding unit is configured to, if a server matched with the subject identification information is queried in the global subject database, take the server as a target server where the second service subject is located and forward the service processing request to the target server.
In some embodiments of the present application, based on the above technical solution, the global subject database includes a first global database located in a memory of the central server and a second global database located in a disk of the central server; the server query unit includes: a first server query subunit configured to query whether a server matching the subject identification information exists in the first global database; and the second server query subunit is configured to query whether a server matched with the main body identification information exists in the second global database if the server matched with the main body identification information is not queried in the first global database.
In some embodiments of the present application, based on the above technical solution, the request forwarding module 930 further includes: a synchronization request unit configured to send a data synchronization request to a partition server communicatively connected to the central server if a server matching the subject identification information is not queried in the global subject database; and the synchronization query unit is configured to acquire the synchronization data returned by the partition servers to the central server and query whether a server matched with the main body identification information exists in the synchronization data.
In some embodiments of the present application, based on the above technical solutions, the data processing apparatus 900 further includes: a response data acquisition module configured to acquire service response data corresponding to the service processing request through the target server; and the response data returning module is configured to return the service response data to the current server where the first service main body is located.
In some embodiments of the present application, based on the above technical solution, the response data obtaining module includes: a service type detection unit configured to detect a service type of the service processing request, where the service type includes a bidirectional service request requiring a response from the second service agent and a unidirectional service request not requiring a response from the second service agent; the first data response unit is configured to forward the service processing request to a target client corresponding to the second service main body through a target server if the service type of the service processing request is a bidirectional service request, so as to obtain service response data generated after the target client responds to the service processing request; and the second data response unit is configured to generate service response data after the target server responds to the service processing request if the service type of the service processing request is the unidirectional service request.
In some embodiments of the present application, based on the above technical solution, the service type detecting unit includes: the service process forwarding subunit is configured to forward the service processing request to a service process running on the target server through a partitioned data routing process running on the target server; and the business process detection subunit is configured to detect the business type of the business processing request through the business process.
In some embodiments of the present application, based on the above technical solution, the response data returning module includes: and the response data forwarding unit is configured to forward the service response data to the central server through the target server, and forward the service response data to the current server where the first service main body is located through the central server.
In some embodiments of the present application, based on the above technical solution, the response data returning module includes: a communication link establishing unit configured to establish a communication link having a preset effective duration between a target server and a current server where a first service agent is located; and a response data transmitting unit configured to transmit the service response data from the target server to the current server based on the communication link.
The specific details of the data processing apparatus provided in each embodiment of the present application have been described in detail in the corresponding method embodiment, and are not described herein again.
Fig. 10 schematically shows a block diagram of a computer system of an electronic device for implementing an embodiment of the present application.
It should be noted that the computer system 1000 of the electronic device shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 10, the computer system 1000 includes a Central Processing Unit (CPU) 1001 that can perform various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) 1002 or a program loaded from a storage section 1008 into a Random Access Memory (RAM) 1003. In the random access memory 1003, various programs and data necessary for system operation are also stored. The cpu 1001, the rom 1002, and the ram 1003 are connected to each other via a bus 1004. An Input/Output interface 1005(Input/Output interface, i.e., I/O interface) is also connected to the bus 1004.
The following components are connected to the input/output interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output section 1007 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 1008 including a hard disk and the like; and a communication section 1009 including a network interface card such as a local area network card, modem, or the like. The communication section 1009 performs communication processing via a network such as the internet. The driver 1010 is also connected to the input/output interface 1005 as necessary. A removable medium 1011 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1010 as necessary, so that a computer program read out therefrom is mounted into the storage section 1008 as necessary.
In particular, according to embodiments of the present application, the processes described in the various method flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication part 1009 and/or installed from the removable medium 1011. When the computer program is executed by the cpu 1001, various functions defined in the system of the present application are executed.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.