Data processing method and device, computer equipment, storage medium and program product

By determining the target service components based on the operation mode and service request information, the problems of difficulty in updating service components and low data processing efficiency in the prior art are solved, and efficient data processing and resource management are achieved.

CN119149514APending Publication Date: 2024-12-17MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411009238.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

When processing service requests, existing database technology makes it difficult to update service components, and cannot adopt different components for different types of service requests, resulting in inefficient data processing and the cache update method increases the database resource burden.

Method used

Determine the service component according to the current operating mode type, and determine the target service component from the service component based on the service request information. Only components related to the service request are used for processing, avoid unnecessary component use and improve data processing efficiency.

Benefits of technology

Through component determination for different mode types and service request types, efficient service request processing is achieved, reducing the number of accesses to the database, reducing resource burden, and improving data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149514A_ABST
    Figure CN119149514A_ABST
Patent Text Reader

Abstract

The invention relates to a data processing method and device, computer equipment, a storage medium and a program product. The method comprises the following steps: determining a service component according to a mode type of a current operation mode; determining a first target service component from the service components according to the service request information; and under the condition that the service request information is the request information of the first service type, performing change processing on local cache data through the first target service component. By adopting the method, the data processing efficiency can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of database technology, and in particular to a data processing method, apparatus, computer equipment, storage medium and program product. Background Art

[0002] Due to the rapid development of database technology, users can set up multiple client nodes and server nodes connected to the database in the back-end system to respond to service requests received by the client, thereby implementing data queries corresponding to service requests or implementing business operations corresponding to service requests (such as login and registration operations and cache change operations, etc.). Usually, each business operation may be implemented through components. Therefore, in the field of database technology, how to perform corresponding business operations through components has become one of the hot issues in current research. Summary of the invention

[0003] Provided are a data processing method, apparatus, computer equipment, storage medium and program product, which can effectively improve data processing efficiency.

[0004] In a first aspect, the present application provides a data processing method, the method comprising:

[0005] Determine the service component according to the mode type of the current operation mode;

[0006] Determining a first target service component from the service components according to the service request information;

[0007] When the service request information is request information of the first service type, the local cache data is changed through the first target service component.

[0008] In a second aspect, the present application further provides a data processing device, the device comprising:

[0009] A first component determination module, used to determine a service component according to a mode type of a current operation mode;

[0010] A second component determination module, configured to determine a first target service component from the service components according to the service request information;

[0011] The cache change module is used to change the local cache data through the first target service component when the service request information is request information of the first service type.

[0012] In a third aspect, the present application further provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the task migration method when executing the computer program.

[0013] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the task migration method are implemented.

[0014] In a fifth aspect, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the task migration method are implemented.

[0015] The above-mentioned data processing method, apparatus, computer equipment, storage medium and program product determine the service component according to the current mode type, realize the determination of the service component for different mode types, and then determine the first target service component from the service component according to the obtained service request information, so that the corresponding first target service component can be determined for different service request information, and the first target service component for the service request information is used to perform related operations, without using other components in the service component that are not related to the service request information. Therefore, the service request operation corresponding to the service request information can be executed more efficiently, thereby improving the execution efficiency of the service request. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 An application environment diagram of a data processing method in an embodiment;

[0018] Figure 2 is a flow chart of a data processing method in one embodiment;

[0019] Figure 3 is a flow chart of a data processing method in another embodiment;

[0020] Figure 4 A schematic diagram of a data interaction flow of a data processing method in one embodiment;

[0021] Figure 5 A schematic diagram of a data interaction flow of a data processing method in another embodiment;

[0022] Figure 6 is a structural block diagram of a data processing device in one embodiment;

[0023] Figure 7FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0025] The data processing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.

[0026] The server 106 can be used alone to execute the data processing method provided in the embodiment of the present application. For example, the server 106 can determine the service component according to the mode type of the current operation mode of the server 106; determine the first target service component from the service component according to the service request information; and perform change processing on the local cache data through the first target service component when the service request information is the request information of the first service type.

[0027] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc.

[0028] The server 106 may be an independent physical server or a service node in a blockchain system, wherein each service node in the blockchain system forms a peer-to-peer network, and the peer-to-peer protocol is an application layer protocol running on the Transmission Control Protocol (TCP). In addition, the server 106 may also be a server cluster composed of multiple physical servers, and may be 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, content distribution networks (CDNs), and big data and artificial intelligence platforms.

[0029] In the related art, in order to ensure the strong consistency of data in the distributed data processing environment, a distributed system is usually designed using a distributed architecture, and each application server is used as both a client node and a server node, so that multiple client nodes and server nodes connected to the database can be set to respond to the service request received by the client, thereby realizing the data query corresponding to the service request, or realizing the business operation corresponding to the service request (such as login registration operation and cache change operation, etc.). Usually, a direct response method is used to process the service request, for example, a unified response service component is used to respond to the service request. At this time, the response service component needs to have the function of processing all types of service requests. Therefore, it is not conducive to the update of the service component, and it is impossible to use different service components for different types of service requests, resulting in low data processing efficiency of the service request. However, when the database is updated, a database update notification will be sent to all client nodes, so that the client node reads the updated configuration parameters from the database and writes them into the local cache of the client node. When the client node generates a response message, it will read the corresponding configuration parameters from the local cache. Such a cache update method will increase with the increase of client nodes, and the number of client nodes reading the database will also increase, thereby increasing the resource burden of the database. In order to achieve more efficient service request operations, client nodes usually need to set up corresponding client devices that contain the components required by the client, and server nodes need to set up corresponding server devices that contain the components required by the server. In addition, a centralized deployment design is usually adopted in the architecture, which has high requirements on the resource performance and availability of the central node device.

[0030] In the present application, the operating mode type of the computer device can be a remote mode or a local mode, and different operating mode types correspond to different service components. Therefore, the present application loads the service components required by the mode type corresponding to the current operating mode according to the different mode types corresponding to the current operating mode type of the computer device, and also selects the corresponding first target service component for different service request information, that is, there is no need to use other components in the service component that are not related to the service request information. Therefore, using the first target service component for the service request information to respond to the request can more efficiently execute the service request operation corresponding to the service request information, thereby improving the efficiency of data processing.

[0031] In an exemplary embodiment, Figure 2 As shown, a data processing method is provided, and the data processing method can be executed by a computer device, specifically by a processor of the computer device. Figure 2 The data processing method may include the following S202 to S206.

[0032] S202: Determine a service component according to the mode type of the current operation mode.

[0033] Among them, the current operation mode refers to the operation mode type of the current computer device, and the mode type can be local mode or remote mode. The computer device in local mode will act as a server node, can communicate and connect with other client nodes, and needs to communicate and connect with the database. The computer device in remote mode will communicate and connect with other client nodes as a client node, or connect with the server node in local mode. If the client node in remote mode is only connected to the sub-client node of the same remote mode, then the client node can act as the server node of the sub-client node and provide parameter query services for the sub-client node.

[0034] It should be further explained that the mode type can also be different connection methods of computer devices in a distributed system. When computer devices use different connection methods, different computer devices can be connected. For example, if a computer device uses a local communication connection, it can communicate with a local database and can also communicate as a server node of other client nodes. For another example, if a computer device uses a remote communication connection, the computer device can be connected to a business system or other sub-client nodes as a client node.

[0035] In one embodiment, the service component may be a parameter loader, a cache component, and a register. Since the service request received by the computer device in the local mode is different from the service request received by the computer device in the remote mode, different service requests apply different service components. Therefore, the service components required by the computer device in different mode types are also different. For example, in the local mode, the computer device needs to load a local loader, a local cache, a local register, and a parameter change listener.

[0036] S204: Determine a first target service component from the service components according to the service request information.

[0037] In one embodiment, determining the first target service component from the service components according to the service request information includes: determining the service type of the service request information; and determining the first target service component from the service components according to the service type.

[0038] It should be noted that, for the sake of simplicity, in the subsequent embodiments, the current node is the current computer device, the next-layer node is the computer device registered with the current node, and the previous-layer node is the computer device registered with the current node.

[0039] In one embodiment, the service type of the service request information can be a notification type request type from an upper-layer node connected in series with the current node (i.e., a computer device), or a service type request type from a lower-layer node, wherein the upper-layer node connected in series with the current node refers to the registration information of the current node recorded in the registration table of the upper-layer node, and the lower-layer node connected in series with the current node refers to the registration information of the lower-layer node recorded in the registration table of the current node.

[0040] It should be further explained that, according to the notification-type request, the request information for determining that the first target service component is the first service type in the service component can be determined, and the request information for the first service type can be a cache change request, but is not limited to this. The service-type request can determine the request information for determining that the first target service component is the second service type and the third service type in the service component, and the request information for the second service type can be a registration request, and the request information for the third service type can be a parameter query request, but is not limited to this.

[0041] In one embodiment, the first target service component includes a registration component. Since the service request information includes request information of different service types, when the service request information is request information of the second service type, the client is registered in the local registration table through the registration component; wherein the service request information originates from the client.

[0042] In one embodiment, the request information of the second service type may be a registration request. In the case where the service request information is a registration request, the client corresponding to the service request information is registered in the local registry through the registration component, so that when a cache change request is received from an upper-layer node, the local registry can be quickly consulted to obtain the address information of each lower-layer node, and the cache change request is sent to the client of each lower-layer node. Therefore, each client node can receive the cache change request sent from the upper-layer node and obtain the cache change request information from the cache change request, without having to access the database again, thereby reducing the number of database accesses.

[0043] The registration component may be a local registrar or a remote registrar. For example, the local registrar may be LocalRegistry, and the remote registrar may be RemoteRegistry.

[0044] In one embodiment, when the service request information is a registration request, if the registration component used is a remote registrar, the remote service related configuration is obtained, and the registration request parameters of the registration request are assembled to obtain assembled registration information; periodic cyclic registration is performed through the registration interface of the remote client corresponding to the remote service related configuration, so that the client corresponding to the service request information can be effectively registered with the remote client corresponding to the remote service related configuration for a long time.

[0045] The registration request parameters may include, but are not limited to, project identifier, application name, client node identifier, client address, etc. The remote service related configuration may include the remote service address, connection timeout, and read timeout. If there are multiple remote service addresses, commas are used to separate the remote service addresses. The connection timeout and read timeout are used to prevent the registration request from timing out, thereby avoiding the situation where the thread is occupied.

[0046] In one embodiment, before registering the client corresponding to the service request information into the local registry through the registration component, the client list in the registry is cleaned up according to the registration validity time in the registry to obtain a valid registry that eliminates expired clients; the current system time is obtained, and the registration time of the valid registry is replaced with the system time to obtain a local registry.

[0047] In one embodiment, the registration validity time can be a registration validity time generated from the registration table when the client registers according to the preset validity period and the registration time, that is, when the client is in a valid registration state before the registration validity time, it is marked as an expired state if it exceeds the registration validity time. It can also be a registration validity time setting for the client in the registration table according to the user's input data, so as to obtain a registration validity time that better meets the user's expectations.

[0048] The client list in the registry refers to a client list constructed according to all client registration information registered in the registry. The client list can be used to view client data more intuitively or to retrieve client data, thereby improving the processing efficiency of client data.

[0049] In one embodiment, data cleaning is performed on the client list in the registry according to the registration validity time in the registry. The registration status of the client in the client list in the registry is first determined according to the registration validity time in the registry to obtain a registration status list, and the clients in the registration status list that are in an expired state are removed to obtain a valid registry that removes the expired clients.

[0050] In one embodiment, the local node needs to perform maintenance and update operations on the local registry at preset intervals or when receiving registration requests sent by other client nodes to ensure the validity of the local registry. However, by obtaining the current system time as the system registration time, the registration time of the valid registry is replaced with the system registration time, thereby obtaining a local registry with updated system time. This can facilitate subsequent query of update maintenance information based on the updated system registration time obtained after each maintenance in the query update maintenance record operation.

[0051] In one embodiment, after the client is registered in the local registry through the registration component, the mode type of the current node is determined. If the mode type of the current node is the local mode, the current process is terminated. If the mode type of the current node is the remote mode, the registration request is sent to the upper-layer node pointed to by the current node through the remote registrar, and the assembled registration information is obtained by obtaining the remote service-related configuration and assembling the registration request parameters of the registration request; a single registration is performed through the registration interface of the remote client corresponding to the remote service-related configuration, so that the client corresponding to the service request information can be registered in the remote client corresponding to the remote service-related configuration.

[0052] It should be further explained that the transmission process of the above registration request will only stop when encountering a local node with a local mode type. Through layer-by-layer transmission, eventually, the local node located at the center can hold all the nodes in the entire data processing network, so that the local node located at the center can comprehensively observe and manage all the nodes in the network.

[0053] In one embodiment, the first target service component includes a parameter query component and a cache component. When the service request information is request information of a third service type, the parameter query component performs a parameter query on the cached data in the cache component to obtain a first query result; if the first query result is not empty, the first query result is returned to the sender of the service request information, and the first query result is locally cached through the cache component.

[0054] The parameter query component may include a local parameter loader and a remote parameter loader, the local parameter loader may be LocalParamLoader, the remote parameter loader may be RemoteParamLoader, and the cache component may be Localcache.

[0055] In one embodiment, the availability of the cache component is first determined. If the cache component is enabled, the input parameters in the parameter request are obtained through the parameter query component, and a parameter query is performed on the cache data corresponding to the input parameters in the cache component based on the input parameters to determine whether there is cache data corresponding to the input parameters in the cache component, thereby obtaining a first query result.

[0056] In one embodiment, if the first query result is not empty, that is, there is cache data corresponding to the input parameter in the cache component, then the cache data corresponding to the input parameter is returned to the sending end corresponding to the service request information to complete the parameter query operation, and the first query result is locally cached through the cache component, so that when the next layer node of the current node receives a parameter query request with the same query parameter, it can quickly query the query result corresponding to the parameter query request from the cache component.

[0057] In one embodiment, when the mode type is local mode, if the first query result is empty, a parameter query is performed on the database based on the service request information to obtain a second query result; the second query result is returned to the sending end corresponding to the service request information; and the second query result is locally cached through a cache component.

[0058] In one embodiment, in a local node whose mode type is local mode, it can be understood that the database and the next layer node can be connected to the local node for communication. Since parameter query is usually a parameter query performed by a lower layer node to an upper layer node, if the first query result is empty, that is, there is no parameter value corresponding to the parameter query request in the local node whose mode type is local mode, the local node needs to perform a parameter query on the database based on the service request information to obtain a second query result to implement the parameter query request, and return the second query result to the sender of the service request information.

[0059] In one embodiment, if the second query result is not empty, the second query result is locally cached through a cache component, so that when the next-layer node of the current node receives a parameter query request with the same query parameters, it can quickly query the query result corresponding to the parameter query request from the cache component. Moreover, since the local node can comprehensively observe and manage all nodes in the data processing network, the number of times the client node accesses the database can be further reduced, thereby reducing the performance requirements for the database device.

[0060] In one embodiment, when the mode type is remote mode, if the first query result is empty, a parameter query is performed through the parameter query interface service of the remote server to obtain a third query result; the third query result is returned to the sender of the service request information; and the third query result is locally cached through the cache component.

[0061] In one embodiment, in a remote node whose mode type is remote mode, if the first query result is empty, that is, the parameter result corresponding to the parameter query request does not exist in the local cache of the remote node, it is necessary to perform a parameter query through the parameter query interface service of the remote server to query the cache data of the cache component in the upper-level node. It can be understood that if there is no corresponding parameter result in the cache data of the upper-level node, a parameter query is performed on the upper-level node of the upper-level node until the parameter result corresponding to the parameter query request is queried.

[0062] The remote server may be the upper node pointed to by the remote node, and the parameter query interface service is a service module for performing local cache query through the parameter loader of the upper node and the cache component of the upper node.

[0063] S206: When the service request information is request information of the first service type, the local cache data is changed through the first target service component.

[0064] The request information of the first service type may be a cache change request or a cache deletion request. The cache change request is usually sent by an upper layer node and is used to notify the first target service component to perform cache change processing. The first target service component may be a cache component, and the local cache data is the cache data stored in the cache component.

[0065] In one embodiment, when the service request information is a cache deletion request, the cache data to be deleted in the service request information is input into the cache deletion function sub-module through the cache deletion function sub-module in the cache component to delete the local cache data, so as to realize the cache data deletion request operation without accessing the database.

[0066] In one embodiment, after the local cache data is changed through the first target service component, the method also includes: changing the cache data of the registered client through the second target service component; the second target service component is a component in the registered client for performing cache data change processing.

[0067] The registered client is a node in a lower layer of the local client node, and the registered client records the registration information of the registered client in the local client.

[0068] In one embodiment, the cache component of the registered client changes the cache data of the registered client according to the cache data to be changed in the service request information, so that while making cache changes to the local node, cache changes can also be made to the registered clients registered with the local client, that is, cache changes are made to the next layer of nodes, and cache change requests are passed down layer by layer. Ultimately, cache changes will occur in all nodes in the data processing network, which can effectively reduce the use of database resources without the need for the database to notify each one.

[0069] In the above data processing method, the service component is determined according to the mode type of the current operating mode to realize the determination of the service component for different mode types, and then the first target service component is determined from the service component according to the service request information, so that the corresponding first target service component can be determined for different service request information. By adopting the first target service component for the service request information, there is no need to go through other components in the service component that are not related to the service request information. Therefore, the service request operation corresponding to the service request information can be executed more efficiently, thereby improving the execution efficiency of the service request.

[0070] In one embodiment, Figure 3 As shown, the method also includes:

[0071] S302, obtaining mode type and component initialization information.

[0072] In one embodiment, the mode type and component initialization information of the node may be acquired in a predefined manner, or the mode type and component initialization information of the current node may be set through configuration data input by a user, but the present invention is not limited thereto.

[0073] The component initialization information is component setting information used for initialization setting. Different component initialization information is required for the initialization process of different original components. Therefore, different initialization settings can be performed on the original components by setting different component initialization information.

[0074] S304, creating an original component according to the pattern type.

[0075] In one embodiment, when the mode type is local mode, a local original registrar and original parameter loader are created.

[0076] Among them, the local original registrar may be LocalParamClientRegistry, and the local original parameter loader may be LocalParamLoader.

[0077] In one embodiment, when the mode type is remote mode, a local original registrar, a remote original registrar, and a remote original parameter loader are created.

[0078] The remote original registrar may be RemoteParamClientRegistry, and the remote original parameter loader may be RemoteParamLoader.

[0079] S306, initializing the original component according to the component initialization information to obtain a service component.

[0080] In one embodiment, when the mode type is local mode, the original component includes a local original registrar and an original parameter loader, and the component initialization information includes a registration effective time and a number of threads; the original component is initialized according to the component initialization information to obtain a service component, including: initializing the original registrar according to the registration effective time to obtain a local registrar; obtaining the local cache effective time, initializing the original parameter loader according to the number of threads and the local cache effective time to obtain a local parameter loader.

[0081] Among them, the registration validity time can be the client registration validity time. Specifically, when the current time of the system exceeds the client registration validity time, the client corresponding to the client registration validity time is marked as an invalid client. The number of threads can be the number of threads for asynchronously notifying the client of parameter changes. The number of threads for asynchronously notifying the client of parameter changes can reflect the thread pool status of the client where the local original parameter loader is located. The local cache validity time can be time data used to reflect the validity period of cached data. Specifically, in the cache clearing mechanism, the local cache validity time can be used to regularly clear invalid cached data, thereby reducing the storage pressure of the cache component.

[0082] In one embodiment, the original registrar is initialized and set according to the effective time of client registration to obtain a local registrar that records the effective time of client registration, and the local registrar is injected into the original parameter loader. Then, the original parameter loader is initialized with the number of threads according to the number of threads to obtain a thread parameter loader. After obtaining the local cache effective time, the thread parameter loader is cache initialized according to the local cache effective time to obtain a local parameter loader.

[0083] Among them, after obtaining the local cache validity period, the method also includes: obtaining a cache available parameter. If the cache available parameter exists, after obtaining the local cache validity period, the thread parameter loader is cache initialized according to the local cache validity period to obtain a local parameter loader; if the cache available parameter does not exist, the database access object is initialized according to the local cache validity period to obtain an initial database access object.

[0084] In one embodiment, the original component includes a local original registrar, a remote original parameter loader and a remote original registrar, and the component initialization information includes a registration effective time, a cycle information and a number of threads; the original component is initialized according to the component initialization information to obtain a service component, including: initializing the local original registrar according to the registration effective time to obtain a local registrar; initializing the remote original registrar according to the cycle information to obtain a remote registrar; obtaining the local cache effective time, initializing the original parameter loader according to the number of threads and the local cache effective time, and obtaining a remote parameter loader; obtaining the local cache change information and the remote service configuration information, and initializing the remote parameter loader according to the local cache change information and the remote service configuration information to obtain a target remote parameter loader.

[0085] The cycle information includes the first cycle of starting the initial registration parameter client to the remote parameter service and the backup cycle of regular registration after the initial registration parameter client to the remote parameter service is successful. The local cache change information includes whether to receive parameter change notification data, parameter change address, parameter change receiving application name, and parameter change receiving node. The remote service configuration information includes project identification, remote service address, connection timeout, and read timeout.

[0086] In one embodiment, a local original registrar is initialized according to the registration validity time to obtain a local registrar, and then a remote original registrar is initialized according to a first cycle period and a backup cycle to obtain a remote registrar; the local cache validity time is obtained, and the original parameter loader is initialized according to the number of threads and the local cache validity time to obtain a remote parameter loader; local cache cache change information and remote service configuration information are obtained, and the remote parameter loader is changed and initialized according to the local cache change information to obtain a remote cache change parameter loader that can be configured to change the local cache information, and then the remote cache change parameter loader is remotely configured and initialized according to the remote service configuration information, thereby obtaining a target remote parameter loader that can configure a remote service node.

[0087] In this embodiment, by obtaining the mode type and component initialization information of the current operating mode, creating different original components according to different mode types, and then initializing the original components according to different component initialization information, a service component is obtained. This enables different service components to have different configuration capabilities, and realizes that parameter configuration does not need to be hard-coded in the component. Through a configurable manner, the component can receive different configuration parameters, thereby realizing flexible configuration parameters.

[0088] In order to understand the solution of this application more clearly, Figure 4 and Figure 5 The specific instructions are as follows:

[0089] Figure 4 The figure shows the data interaction diagram between the node and the database in the local mode. The node in the local mode can receive registration requests and parameter query requests from the nodes in the next layer, and can receive cache change requests from the Redis third-party database manager through the parameter change subscriber. In addition, it can query the database by sending parameter query requests, and can also perform cache change processing by sending cache change requests to the parameter service interface of the remote server.

[0090] Figure 5 The data interaction diagram between a node with a remote mode and another node with a remote mode is shown in the figure. The remote mode node can receive registration requests and parameter query requests sent by the next layer of nodes, and can perform cache change processing by sending cache change requests to the parameter service interface of the remote server.

[0091] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0092] Based on the same inventive concept, the embodiment of the present application also provides a data processing device for implementing the data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more data processing device embodiments provided below can refer to the limitations on the data processing method above, and will not be repeated here.

[0093] In an exemplary embodiment, Figure 6 As shown, a data processing device is provided, including: a first component determination module 602, a second component determination module 604 and a cache change module 606, wherein:

[0094] A first component determination module 602, configured to determine a service component according to a mode type of a current operation mode;

[0095] A second component determination module 604, configured to determine a first target service component from the service components according to the service request information;

[0096] The cache changing module 606 is used to change the local cache data through the first target service component when the service request information is the request information of the first service type;

[0097] In one embodiment, the second component determination module 604 is further used to determine the service type of the service request information; and determine the first target service component from the service components according to the service type.

[0098] In one embodiment, after the local cache data is changed through the first target service component, the device also includes: a second cache change module, which is used to change the cache data of the registered client through the second target service component; the second target service component is a component in the registered client for performing cache data change processing.

[0099] In one embodiment, the first target service component includes a registration component, and the apparatus further includes:

[0100] A registration module, used for registering the client corresponding to the service request information in a local registration table through a registration component when the service request information is request information of the second service type;

[0101] In one embodiment, the registration module is also used to clean up the client list in the registration table according to the registration validity time in the registration table to obtain a valid registration table that removes expired clients; obtain the current system time, replace the registration time of the valid registration table with the system time, and obtain a local registration table.

[0102] In one embodiment, the first target service component includes a parameter query component and a cache component, and the device further includes:

[0103] The query module is used to perform a parameter query on the cached data in the cache component through the parameter query component to obtain a first query result when the service request information is a request information of the third service type; if the first query result is not empty, the first query result is returned to the sender of the service request information, and the first query result is locally cached through the cache component.

[0104] In one embodiment, the query module is also used to, when the mode type is local mode, if the first query result is empty, perform a parameter query on the database based on the service request information to obtain a second query result; return the second query result to the sender of the service request information; and locally cache the second query result through a cache component.

[0105] In one embodiment, the query module is also used to, when the mode type is a remote mode, if the first query result is empty, perform a parameter query through the parameter query interface service of the remote server to obtain a third query result; return the third query result to the sender of the service request information; and locally cache the third query result through the cache component.

[0106] Each module in the above data processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0107] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 7As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a data processing method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0108] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0109] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above data access method when executing the computer program.

[0110] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned data access method are implemented.

[0111] In one embodiment, a computer program product is provided, including a computer program, which implements the steps of the above data access method when executed by a processor. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant regulations.

[0112] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0113] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0114] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A data processing method, characterized in that: The method comprises: Determine the service component according to the mode type of the current operation mode; Determining a first target service component from the service components according to the service request information; When the service request information is request information of the first service type, the local cache data is changed through the first target service component.

2. The method according to claim 1, characterized in that: The determining the first target service component from the service components according to the service request information includes: Determine the service type of the service request information; The first target service component is determined from the service components according to the service type.

3. The method according to claim 1, characterized in that After the local cache data is changed by the first target service component, the method further includes: The cached data of the registered client is changed by the second target service component; the second target service component is a component in the registered client for performing cached data change processing.

4. The method according to claim 1, characterized in that: Before determining the service component according to the mode type of the current operation mode, the method further includes: Obtaining the mode type and component initialization information of the current operating mode; Creating a primitive component according to the pattern type; The original component is initialized according to the component initialization information to obtain the service component.

5. The method according to claim 4, characterized in that The original component includes a local original registrar and an original parameter loader, and the service component includes a local registrar and a local parameter loader; the component initialization information includes a registration effective time and a number of threads; and initializing the original component according to the component initialization information to obtain the service component includes: Initializing the original registrar according to the registration validity time to obtain a local registrar; The local cache valid time is obtained, and the original parameter loader is initialized according to the number of threads and the local cache valid time to obtain a local parameter loader.

6. The method according to claim 4, characterized in that The original component includes a local original registrar, a remote original parameter loader and a remote original registrar, and the component initialization information includes a registration validity period, cycle information and the number of threads; and initializing the original component according to the component initialization information to obtain the service component includes: Initializing the local original registrar according to the registration validity time to obtain a local registrar; Initializing the remote original registrar according to the cycle information to obtain a remote registrar; Obtaining the local cache validity time, initializing the original parameter loader according to the number of threads and the local cache validity time, and obtaining a remote parameter loader; The local cache change information and the remote service configuration information are obtained, and the remote parameter loader is initialized according to the local cache change information and the remote service configuration information to obtain a target remote parameter loader.

7. The method according to claim 1, characterized in that The first target service component includes a registration component, and the method further includes: In the case where the service request information is request information of the second service type, the client corresponding to the service request information is registered in the local registration table through the registration component.

8. The method according to claim 7, characterized in that Before registering the client corresponding to the service request in the local registration table through the registration component, the method further includes: Cleaning up the client list in the registration table according to the registration validity period in the registration table to obtain a valid registration table from which expired clients are removed; The current system time is obtained, and the registration time of the effective registration table is replaced with the system time to obtain the local registration table.

9. The method according to claim 1, characterized in that: The first target service component includes a parameter query component and a cache component, and the method further includes: In a case where the service request information is request information of the third service type, performing a parameter query on cache data in the cache component through the parameter query component to obtain a first query result; If the first query result is not empty, the first query result is returned to the sender of the service request information, and the first query result is locally cached through the cache component.

10. The method according to claim 9, characterized in that The method further comprises: In the case where the mode type is the local mode, if the first query result is empty, a parameter query is performed on the database based on the service request information to obtain a second query result; Returning the second query result to the sender of the service request information; The second query result is locally cached by the cache component.

11. The method according to claim 9, characterized in that The method further comprises: In the case where the mode type is the remote mode, if the first query result is empty, a parameter query is performed through the parameter query interface service of the remote server to obtain a third query result; Returning the third query result to the sending end of the service request information; The third query result is locally cached by the cache component.

12. A data processing device, characterized in that: The device comprises: A first component determination module, used to determine a service component according to a mode type of a current operation mode; A second component determination module, configured to determine a first target service component from the service components according to the service request information; The cache change module is used to change the local cache data through the first target service component when the service request information is request information of the first service type.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.