Business processing method, apparatus, device, and storage medium

By establishing a tree structure in the client application and using hierarchical traversal to obtain information about business monitoring nodes, the problem of engineering coupling between multiple businesses is solved, efficient business processing and decoupling are achieved, and the maintainability of the system is improved.

CN114202308BActive Publication Date: 2025-10-17BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111503631.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-10
Publication Date
2025-10-17
Estimated Expiration
2041-12-10

AI Technical Summary

Technical Problem

The degree of engineering coupling between multiple businesses in the client application is high, the development process is complex, redundant, and inefficient.

Method used

By establishing a tree structure and using a hierarchical traversal method to obtain information about business monitoring nodes, and sending data according to the business processing requirements and priority, the processing flow is simplified and business decoupling is achieved.

Benefits of technology

It improves business processing efficiency, simplifies the development process, enhances system maintainability, and coordinates the decoupling and processing timing between multiple businesses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114202308B_ABST
    Figure CN114202308B_ABST
Patent Text Reader

Abstract

The present disclosure provides a business processing method, device and equipment, and a storage medium, relates to the technical field of computers, in particular to the field of application programs. The specific implementation scheme is as follows: a business processing method comprises the following steps: acquiring data corresponding to a current node of a business according to information of the current node; and sending the data corresponding to the current node to the business according to the information of the current node and processing requirements of the business. The business processing method provided in the present disclosure can acquire data required by a business through a business monitoring node, and does not need to develop a processing flow for each business separately, thereby simplifying the business processing flow and improving processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the field of computer technology, and particularly to the field of application programs. BACKGROUND

[0002] A client application is referred to as a client. Many businesses can be included in the client. By listening to a business switch of a certain business sent by a server, it can be determined whether the client opens or hides the business. The engineering coupling degree between multiple businesses of the client is high, and it is necessary to develop a parsing and distribution process for each business. The development process is complex and redundant, and the efficiency is low. SUMMARY

[0003] The present disclosure provides a business processing method, device, equipment, and storage medium.

[0004] According to an aspect of the present disclosure, a business processing method is provided, comprising:

[0005] According to the information of the current node listened to by the business, the data corresponding to the current node is obtained;

[0006] According to the information of the current node and the processing requirement of the business, the data corresponding to the current node is sent to the business.

[0007] According to another aspect of the present disclosure, a business processing device is provided, comprising:

[0008] The obtaining module is configured to obtain the data corresponding to the current node according to the information of the current node listened to by the business;

[0009] The sending module is configured to send the data corresponding to the current node to the business according to the information of the current node and the processing requirement of the business.

[0010] According to another aspect of the present disclosure, an electronic device is provided, comprising:

[0011] At least one processor; and

[0012] The memory is in communication connection with the at least one processor; wherein

[0013] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the above-mentioned method.

[0014] According to another aspect of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is provided, wherein the computer instructions are used to make the computer execute the above-mentioned method.

[0015] According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method described above.

[0016] It should be understood that the details described in this section are not intended to identify key or critical features of the embodiments of the present disclosure, nor are they used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent through the following description. BRIEF DESCRIPTION OF DRAWINGS

[0017] The accompanying drawings are used to better understand the present scheme, and do not constitute a limitation on the present disclosure. Among them:

[0018] Figure 1 is a flowchart of a business processing method according to an embodiment of the present disclosure;

[0019] Figure 2 is a flowchart of a business processing method according to another embodiment of the present disclosure;

[0020] Figure 3 is a schematic diagram of a tree structure according to an embodiment of the present disclosure;

[0021] Figure 4 is a schematic block diagram of a business processing device according to an embodiment of the present disclosure;

[0022] Figure 5 is a schematic block diagram of a business processing device according to another embodiment of the present disclosure;

[0023] Figure 6 is a schematic diagram of an example of a business processing device according to another embodiment of the present disclosure;

[0024] Figure 7 is a schematic diagram of a tree node manager according to an embodiment of the present disclosure;

[0025] Figure 8 is a block diagram of an electronic device for implementing a business processing method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to assist in understanding, and should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, in order to be clear and concise, descriptions of well-known functions and structures are omitted in the following description.

[0027] Figure 1 is a flowchart of a business processing method according to an embodiment of the present disclosure. The method can include:

[0028] S101, obtaining data corresponding to the current node according to information of the current node listened by the service;

[0029] S102, sending the data corresponding to the current node to the service according to the information of the current node and processing requirements of the service.

[0030] Exemplarily, a client application program can be referred to as a client or an application (APP) for short. The client can include a plurality of service components. A service component can be referred to as a service, and each service can implement a certain function. For example, a video service can implement a function of playing a video, an audio service can implement a function of playing an audio, and a voice recognition service can implement a function of voice recognition. One or more pieces of information required by a service to be listened to can be pre-stored in a node. If one or more services listen to information of a certain node, the node being listened to can be referred to as a current node, and data corresponding to the current node can be obtained according to the information of the current node. For example, information of a certain service switch is included in the information of the current node listened by the service, and the data corresponding to the current node can be obtained according to the information of the service switch. Then, the data corresponding to the current node is sent to one or more services listening to the current node.

[0031] In an implementation, if different services have different processing requirements, such as different priorities and / or different processing timings, the data corresponding to the current node can be sent to one or more services listening to the current node according to the priorities and / or the processing timings of the services.

[0032] The service processing method of the embodiments of the present disclosure can obtain data required by a service by listening to a node, without developing a processing flow for each service, thereby simplifying the service processing flow and improving processing efficiency. Further, the embodiments of the present disclosure are beneficial to decoupling between multiple services and have good maintainability.

[0033] Figure 2 is a flow diagram of a service processing method according to another embodiment of the present disclosure. The service processing method of the embodiment can include the steps of the above embodiments. In an implementation, the service includes a service component in a client, and the current node includes a node in a tree structure, which is established based on a relationship between each service of the client and a key to be listened to by the service.

[0034] In an example, in the case of cold start of the client, a tree structure including a relationship between a service and a key to be listened to by the service can be established according to the relationship. The tree structure including the nodes can be established by a node generator module. For example, Figure 3As shown, the tree structure can include multiple levels of nodes. For example, the uppermost node of the tree structure is a root node R, the middle level can include multiple nodes N1-Nm, and the lowermost level can include one or more leaf nodes Nn1-Nnk. According to the hierarchical relationship between nodes, it can be determined which child nodes the root node includes, which child nodes the child nodes include, and so on. Through the tree structure, the relationship between each service of the client and the key to be listened to by the service can be established in an orderly manner.

[0035] In an embodiment, as shown, the method further includes: Figure 2

[0036] S201, using a hierarchical traversal manner to traverse the tree structure, and obtaining information of a current node listened to by at least one service, the information of each node of the tree structure including a relationship between a service and a key to be listened to by the service. The key can be used to identify a service switch. For example, the key listened to by a certain service is used to identify a service switch that can be listened to by the service. Multiple services can listen to the same key, that is, listen to the same service switch.

[0037] In an embodiment of the present disclosure, the client application program can receive a service switch of a certain service from the server, and start or hide the service according to a state value of the service switch. For example, if the state value of the service switch of a certain service is 1, the service can be started; if the state value of the service switch of a certain service is 0, the service can be hidden. In addition to 1 and 0, other values can also be used to represent different states of the service switch to start or hide the service, which is not limited in the embodiment of the present disclosure.

[0038] In an example, using a hierarchical traversal manner, a current node listened to by a certain service can be found in the tree structure, and various information of the found current node can be read. For example, a certain service listens to a key Key1, and the information of the current node including Key1 can be found in the tree structure.

[0039] In an embodiment of the present disclosure, using a hierarchical traversal manner to traverse the tree structure, the information of the node listened to by the service can be efficiently and quickly obtained.

[0040] In an embodiment, the information of each node of the tree structure further includes at least one of the following: a node name, a node full path, a child node array of the node, and a service array of a node of interest.

[0041] ​The node name can be used to distinguish different nodes in the tree structure, and can include one or more of letters, numbers, symbols, and the like used to identify a key. For example, the name of node 1 can be Key1, the name of node 2 can be Key2, the name of node N can be KeyN, and the like. Different node names represent different nodes. Based on the node name, it is beneficial to perform hierarchical traversal in the tree structure and quickly find the required node.

[0042] The node full path can also be referred to as the complete key path of the node, and can include the path relationship of the node to other nodes, and can point to each layer of child nodes of a certain node in the memory. For example, the full path of node 1 includes the path relationship of node 1 to the next layer nodes 11 and 12. The full path of node 1 can include: the path Key1->Key11 of node 1 to node 11, and the path Key1->Key12 of node 1 to node 12. Among them, Key1 saved by node 1 can represent a service switch that can be listened to by a certain specific service such as a video service; Key11 saved by node 11 can represent a service switch that can be listened to by a sub-service of the video service such as a small video service; and Key12 saved by node 12 can represent a service switch that can be listened to by another sub-service of the video service such as a short video service.

[0043] The child node array of a node can include the relationship between a certain node and the next layer or multiple layers of nodes. For example, the child nodes of node 1 include node 11 and node 12, and the child node array of node 1 can include information of node 11 and node 12, such as the key Key11 of node 11 and the key Key12 of node 12. For another example, the child nodes of node 12 include node 121, node 122, and node 123, and the child node array of node 12 can include information of node 121, node 122, and node 123, such as the key Key121 of node 121, the key Key122 of node 122, and the key Key123 of node 123.

[0044] The service array of the node of interest can also be referred to as the service array that wants to listen to the node. For example, service A, service B, and service C all want to listen to node 1, and the service array of node 1 of interest can include service A, service B, and service C.

[0045] In the embodiments of the present disclosure, one or more of the above parameters included in the information of each node of the tree structure helps the service to listen to the node and realizes efficient hierarchical traversal.

[0046] In an embodiment, the information of the current node comprises a relationship between the service and the key to be listened to, and in S101, the data corresponding to the current node is obtained according to the information of the current node listened to by the service, including: obtaining the value corresponding to the key included in the current node from the update data, the value corresponding to the key included in the current node comprising the data corresponding to the current node, and the data corresponding to the current node comprising the data required by the service listening to the current node.

[0047] For example, the update data is parsed to obtain a plurality of key-value pairs. In the parsed key-value pairs, the corresponding value can be found according to the key (service switch) included in the current node. For example, Key11 is found to be the key listened to by the small video service through hierarchical traversal from the tree structure, and Key11 is searched in the key-value pairs obtained by parsing the update data to obtain the value Value11 corresponding to Key11. Value11 is the data required by the small video service. Then, the data required by the small video service can be transmitted to the small video service component of the client. If the value corresponding to Key11 cannot be searched, no value can be returned, or a value in the form of Null or the like can be returned to the small video service of the client.

[0048] In the embodiments of the present disclosure, the value corresponding to the key included in the current node is obtained from the update data, so that the data corresponding to the current node can be accurately and quickly obtained.

[0049] In an embodiment, the update data comprises network update data and / or local update data of the client. For example, the update data can be saved on a server, and the update data obtained from the server through the Internet or the like can be referred to as network update data. For example, the update data can be obtained from the server through a network communication module. For another example, the update data can not be saved on a certain fixed server, but can support the client to have local update data according to the characteristics of the client.

[0050] In the embodiments of the present disclosure, the network update data and / or local update data and other more update data obtaining modes can be supported, so that the client application program of externally customized data can be extended, and the application scope is more extensive.

[0051] In an embodiment, the processing requirement comprises a processing priority, and in S102, the data corresponding to the current node is sent to the service according to the information of the current node and the processing requirement of the service, including: S1021, in the case that a plurality of services listen to the same current node, the data corresponding to the current node is sequentially sent to the plurality of services according to the processing priority of the plurality of services and the information of the current node.

[0052] If multiple services monitor the same node, the data required by the services can be sent according to the processing priority coordination distribution order of the multiple services. For example, service A, service B and service C monitor the same node 1, the processing priority of service B is higher than that of service A, and the processing priority of service A is higher than that of service C, and the data required by the services can be sent in the order of service B, service A and service C. For example, the data processing distribution module can first send the data required by service B to service B, then send the data required by service A to service A, and finally send the data required by service C to service C.

[0053] In the embodiments of the present disclosure, multiple services monitor the same node, and the data required by the services can be sent according to the processing priority of the services, which is beneficial to coordinating the time sequence of processing of different services monitoring the same key and using the processing priority of different services to unify the processing distribution mechanism.

[0054] In an implementation, the processing requirement includes a processing occasion. In the embodiments of the present disclosure, the processing occasion can also be referred to as a starting processing occasion or an execution occasion. The processing occasion of a service can indicate whether the service needs to be processed after the current cold start of the client. The processing occasion of this execution can also be referred to as immediate execution, which can indicate that the service needs to be processed after the current start. The processing occasion of next execution can indicate that the service does not need to be processed after the current start, but needs to be processed after the next start.

[0055] In an implementation, in S102, according to the information of the current node and the processing requirement of the service, the data corresponding to the current node is sent to the service, and the method further includes:

[0056] S1022, in the case that the processing occasion of the service is this execution, after obtaining the data corresponding to the current node from the updated data, the service monitors the data corresponding to the current node of the current node.

[0057] For example, two application programming interfaces (APIs) are set, one API is used to download data from the cache (load from local), and the other API is used to download data from the network (load from net). After the client is started, the service can call the two APIs.

[0058] If the service needs to be executed this time according to the agreement, the service can call an API to download updated data from the network, and after the updated data downloaded from the network is parsed, if the data required by the service is found, the data distribution can be executed immediately, and the data required by the service is returned to the service. In addition, the service can also call another API to download data from the local, and the data of the service can not be saved in the local.

[0059] If the service needs next execution according to the agreement, the service can call an API to download the last cached content from the cache, perform data distribution (not performed if there is no cache), and call another API to download update data from the network. After parsing the update data downloaded from the network, if the data required by the service is found, the data required by the service can be saved in the local cache for next execution.

[0060] The calling sequence of the above two APIs is only an example, and can be flexibly set according to requirements.

[0061] In an embodiment, in S102, the data corresponding to the current node is sent to the service according to the information of the current node and the processing requirement of the service, and further comprising:

[0062] S1023, in the case that the processing time of the service is next execution, after obtaining the data corresponding to the current node from the update data, the data corresponding to the current node is saved to the cache;

[0063] S1024, after the service is started next time, the data corresponding to the current node is sent to the service.

[0064] In the embodiments of the present disclosure, the timing relationship between S1021, S1022 and S1023 is not limited, and these steps are specific ways of sending data corresponding to the current node to the service in different cases, and the corresponding steps can be executed according to the actual situation.

[0065] In the embodiments of the present disclosure, the data required by the service is sent according to the processing time of the service, which can flexibly distinguish the processing time of different services and improve the processing efficiency of the service. For example, the current execution is suitable for services with high processing time requirement, and the next execution is suitable for services with low processing time requirement. In the embodiments of the present application, the data required by the service can be selectively sent according to the processing time of the service, which is beneficial to reasonably coordinate the processing time according to the characteristics of different services and improve the overall efficiency of task processing.

[0066] In an embodiment, the method further comprises at least one of the following steps based on the agreement:

[0067] Registering the relationship between each service and the key to be listened to;

[0068] Setting the processing priority of each service;

[0069] Setting the processing time of each service.

[0070] Exemplarily, in the registration process, the relationship between a service and a key to be listened to by the service can be registered based on a protocol, and processing requirements such as a priority and a processing time can be processed. By registering the relationship between each service and a key to be listened to by the service, the relationship between the service and the key to be listened to by the service can be utilized, so that the service can listen to a node including a service switch identified by the key. By setting the processing priority of each service, when multiple services listen to the same key, the processing priority of different services can be utilized to uniformly process a distribution mechanism. By setting the processing time of each service, different service processing times can be flexibly distinguished, and processing efficiency can be improved. In an embodiment of the present disclosure, at least one step performed based on the protocol can be implemented by a service registration module.

[0071] Figure 4 FIG. 1 is a structural schematic block diagram of a service processing device according to an embodiment of the present disclosure. The device can include:

[0072] The obtaining module 401 is configured to obtain data corresponding to a current node according to information of the current node listened to by a service.

[0073] The sending module 402 is configured to send the data corresponding to the current node to the service according to the information of the current node and processing requirements of the service.

[0074] Exemplarily, a service included in a client can implement a certain function. If one or more services listen to information of a node, the node listened to can be referred to as a current node, and data corresponding to the current node can be obtained according to the information of the current node. For example, the information of the current node listened to by the service includes information of a service switch, and the data corresponding to the current node can be obtained according to the information of the service switch. Then, the data corresponding to the current node is sent to one or more services listening to the current node.

[0075] In an implementation, if different services have different processing requirements, for example, different priorities and / or different processing times, the data corresponding to the current node can be sent to one or more services listening to the current node according to the priority and / or the processing time of the service.

[0076] The service processing method of an embodiment of the present disclosure can obtain data required by a service by listening to a node, without developing a processing flow for each service, simplifying a service processing flow, and improving processing efficiency. Further, the service processing method is beneficial to decoupling between multiple services, and has good maintainability.

[0077] Figure 51 is a block diagram illustrating the structure of a service processing device according to another embodiment of the present disclosure. The service processing device of this embodiment may include the modules of the above-mentioned embodiments. In one embodiment, the service includes a service component in the client, and the current node includes a node in a tree structure, and the tree structure is established based on the relationship between each service of the client and the key to be monitored. In the embodiment of the present disclosure, the relationship between each service of the client and the key to be monitored can be established in an orderly manner through the tree structure.

[0078] In one embodiment, the device further comprises:

[0079] Traversal module 501 is configured to traverse the tree structure using a hierarchical traversal method to obtain information about at least one current node for service monitoring. The information about each node in the tree structure includes the relationship between the service and the key being monitored. The key can be used to identify a service switch. For example, a key for a service monitoring service is used to identify the service switch for that service monitoring service. In the disclosed embodiments, traversing the tree structure using a hierarchical traversal method can efficiently and quickly obtain information about the nodes for service monitoring.

[0080] In one embodiment, the information for each node in the tree structure also includes at least one of the following: the node name, the full path of the node, an array of the node's child nodes, and an array of services that follow the node. In the disclosed embodiments, including one or more of the above parameters in the information for each node in the tree structure facilitates efficient hierarchical traversal of service monitoring nodes.

[0081] In one embodiment, the information of the current node includes a relationship between the service and the key to be monitored. The acquisition module 401 is specifically configured to acquire, from the updated data, a value corresponding to the key included in the current node. The value corresponding to the key included in the current node includes data corresponding to the current node. The data corresponding to the current node includes data required for monitoring the service of the current node. In the disclosed embodiment, the value corresponding to the key included in the current node is acquired from the updated data, thereby enabling accurate and rapid acquisition of the data corresponding to the current node.

[0082] In one embodiment, the update data includes: network update data and / or local update data of the client. In the disclosed examples, more update data acquisition methods such as network update data and / or local update data can be supported, thereby being extended to client applications that customize external data, and having a wider range of applications.

[0083] In an embodiment, the processing requirement comprises a processing priority, and the sending module 302 is specifically configured to, in a case where a plurality of services listen to the same current node, send the data corresponding to the current node to the plurality of services according to the processing priority of the plurality of services and the information of the current node. In the embodiment of the present disclosure, in a case where a plurality of services listen to the same node, the data required by the services can be sent according to the processing priority of the services, which is beneficial to coordinating the time sequence of processing of different services listening to the same key and using the processing priority of different services to unify the processing distribution mechanism.

[0084] In an embodiment, the processing requirement comprises a processing occasion, and the sending module 402 is specifically configured to, in a case where the processing occasion of the service is this execution, send the data corresponding to the current node to the service after obtaining the data corresponding to the current node from the update data.

[0085] In an embodiment, the processing requirement comprises a processing occasion, and the sending module 402 is specifically configured to, in a case where the processing occasion of the service is this execution, send the data corresponding to the current node to the service after obtaining the data corresponding to the current node from the update data.

[0086] In an embodiment, the apparatus further comprises a registration module 502, configured to perform at least one of the following steps based on a protocol:

[0087] registering a relationship between each service and a key to be listened to by the service;

[0088] setting a processing priority of each service;

[0089] setting a processing occasion of each service.

[0090] For example, in the registration process, the relationship between the service and the key to be listened to by the service can be determined, and the processing requirement such as the processing priority and the processing occasion can also be processed. By registering the relationship between each service and the key to be listened to by the service, the relationship between the service and the key to be listened to by the service can be used, so that the service can listen to the node comprising the service switch identified by the key. By setting the processing priority of each service, in a case where a plurality of services listen to the same key, the processing priority of different services can be used to unify the processing distribution mechanism. By setting the processing occasion of each service, different service processing occasions can be flexibly distinguished.

[0091] The functions and examples of the modules of the service processing apparatus in the embodiments of the present disclosure can be referred to the related description in the above-mentioned service processing method embodiments, which will not be described here.

[0092] In a specific example, as shown in Figure 6 The service processing apparatus of the present disclosure can include a service registration module 601, a node generator module 602, a network communication module 603, a data cache module 604, and a data processing distribution module 605. The service processing apparatus of the present disclosure can be implemented by a software tool, for example.

[0093] The service registration module 601: The service of the client (also referred to as the service party) complies with the external protocol of the service processing apparatus, and registers the service and the key (KEY) to be listened to in the apparatus through the registration capability provided by the apparatus. The key can be used to identify the service switch of the service. Through registration, the correspondence between the service and the key to be listened to can be determined. For example, registering service A+key indicates the registration of the relationship between service A and the key to be listened to; registering service B+key indicates the registration of the relationship between service B and the key to be listened to; registering service C+key indicates the registration of the relationship between service C and the key to be listened to, and so on. The external protocol provided by the apparatus can include a service processing priority for processing the analysis priority of multiple services listening to the same key. The external protocol provided by the apparatus can set the starting processing time, and through the setting of the starting processing time, it can be determined whether to make the update of the current start effective or the next start effective.

[0094] The node generator module 602: This module generates a custom tree node manager (also referred to as a tree structure, node tree, or tree, etc.) according to the key-value pairs of the services registered by the service registration module and the keys to be listened to. For example, the parameters contained in each node (node) can specifically include: node name, node full path, node child node array, and service component array interested in the current node, etc.

[0095] As shown in Figure 7 , the node name can be represented by the key and can include the key that the service wants to listen to. The node full path can be represented by the key path and is used to indicate the complete key path of the node. The node child node array can include notificationNames, which is used to indicate, for example, a notification array. The notification array can include the information of the service in the notification mode. The service component array interested in the current node can be represented by Modules, which is used for the node-related child node array.

[0096] For example, the service of a certain client is a video service, including small video and short video services. The root node in the tree node manager can correspond to the video service, and the root node includes two child nodes corresponding to small video and short video.

[0097] After the tree node manager is created, the network communication module 603 can initiate a network request to obtain network data from a server (or server). The network communication module 603 delivers the obtained data to the data processing and distribution module 605 for processing. The data processing and distribution module 605 distributes the data of the corresponding node to the business that listens to the current node according to the node information of each node. The business processes the obtained data according to different business logic.

[0098] The network communication module 603: communicates with the server to obtain client update data. It can have a built-in network request capability, or it can support the ability of external custom network request data acquisition. For example, the update data required by the business can also be local data. Specifically, when the APP is cold started, the network communication module 603 can obtain update data from the network side or locally, and parse the update data. According to the tree node manager described above, the keys included in each business listening node of the APP are obtained, and the data corresponding to the node (i.e., the key corresponding value) is searched in the parsed update data based on the key.

[0099] The data caching module 604: caches network communication data to provide the ability to distinguish the execution time according to different businesses. It can implement the ability to execute immediately or next time according to different businesses. Immediate execution can include delivering the data of interest to the data processing and distribution module 605 for distribution after parsing the network data of this request. The data processing and distribution module 605 distributes the data to the corresponding business component for business processing. Next execution can include that the data processing and distribution module 605 does not execute this time, and reads the cached content of the last time to execute the data distribution processing when the application is started next time.

[0100] For example, two APIs are set, one API is used to download data from the cache (load from local), and the other API is used to download data from the network (load from net). After the APP is cold started, the business calls these two APIs. Moreover, if the business needs to execute this time according to the protocol, the data distribution is executed immediately after the network download data is parsed. If the business needs to execute next time according to the protocol, the data distribution is executed by reading the cached content of the last time, and if there is no cached content, it is not executed, and the data is saved in the local cache for next execution after the network download data is parsed.

[0101] The data processing and distribution module 605: parses the data delivered by the network communication module, uses an efficient tree level traversal method to traverse the custom node tree structure, and if there are multiple businesses listening to the same key, the data is distributed to the business listening to this node according to the priority of the business.

[0102] The embodiments of the present disclosure can solve the problem of no standardized process of client update capability, and can coordinate the time sequence of processing of different services listening to the same key (service switch) by setting service priority, for example, distributing data to high-priority services first and then distributing data to low-priority services. When multiple services listen to the same key value, a unified processing and distribution mechanism is provided; the node manager can simplify the listening process, reduce the development difficulty of service distribution and processing processes, improve efficiency, and solve the problems of complicated switch listening process and complex process; the service processing process is decoupled, has good maintainability, and increases the distinction of execution time to achieve the distinction of execution time for different services.

[0103] In the technical solutions of the present disclosure, the acquisition, storage and application of user personal information comply with relevant laws and regulations and do not violate public order and good customs.

[0104] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.

[0105] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.

[0106] As shown in Figure 8 The device 800 includes a computing unit 801 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. Various programs and data required for the operation of the device 800 can also be stored in the RAM 803. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0107] A plurality of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a magnetic disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0108] The computing unit 801 can be various general and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 801 performs various methods and processes described above, such as the service processing method described above. For example, in some embodiments, the service processing method can be implemented as a computer software program, which is tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded onto the RAM 803 and executed by the computing unit 801, one or more steps of the service processing method described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured to perform the service processing method by any other appropriate means, such as by means of firmware.

[0109] Various implementations of the systems and techniques described above herein can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0110] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0111] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0112] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0113] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0114] The computer system can include clients and servers. This relationship can be. The servers are typically remote from the clients with the interactions between them occurring over a communication network. The relationship between client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The servers can be cloud servers, servers of a distributed system, or servers incorporating blockchain.

[0115] It should be understood that the steps shown in the various forms above can be reordered, added to, or removed. For example, the steps described in the present disclosure can be performed in parallel, in series, or in a different order, without limitation herein, so long as the desired results of the technology disclosed in the present disclosure are achieved.

[0116] The specific embodiments described above are not intended to be limiting, and persons skilled in the art will appreciate that various modifications, combinations, sub-combinations and alternatives can be made to the specific embodiments without departing from the spirit and principles of the disclosure. Any further modifications, equivalents or alternatives within the spirit and principles of the disclosure are to be considered as falling within the scope of the disclosure.

Claims

1. A business processing method, comprising: Obtain data corresponding to the current node based on the information of the current node monitored by the business; According to the information of the current node and the processing requirements of the business, the data corresponding to the current node is sent to the business; wherein the business includes the business components in the client, and the current node includes the nodes in the tree structure, and the tree structure is established based on the relationship between the various businesses of the client and the keys to be monitored.

2. The method according to claim 1, further comprising: The tree structure is traversed in a hierarchical manner to obtain information of a current node monitored by at least one service. The information of each node in the tree structure includes the relationship between the service and the key to be monitored, and the key is used to identify the service switch.

3. The method according to claim 2, wherein: The information of each node in the tree structure further includes at least one of the following: a node name, a full path of the node, an array of child nodes of the node, and an array of services of the focused node.

4. The method according to any one of claims 1 to 3, wherein The information of the current node includes the relationship between the service and the key to be monitored. According to the information of the current node monitored by the service, the data corresponding to the current node is obtained, including: A value corresponding to a key included in the current node is obtained from the updated data, where the value corresponding to the key included in the current node includes data corresponding to the current node, and the data corresponding to the current node includes data required for monitoring a service of the current node.

5. The method according to claim 4, wherein The update data includes: network update data and / or local update data of the client.

6. The method according to any one of claims 1 to 3, wherein The processing requirement includes a processing priority, and sending data corresponding to the current node to the service according to the information of the current node and the processing requirement of the service, including: In the case that multiple services monitor the same current node, data corresponding to the current node are sent to the multiple services in sequence according to the processing priorities of the multiple services and the information of the current node.

7. The method according to any one of claims 1 to 3, wherein the processing requirement includes a processing timing, and sending data corresponding to the current node to the service based on the information of the current node and the processing requirement of the service, further comprising: In a case where the processing timing of the service is the current execution, after acquiring the data corresponding to the current node from the update data, the data corresponding to the current node is sent to the service.

8. The method according to any one of claims 1 to 3, wherein the processing requirement includes a processing timing, and sending data corresponding to the current node to the service based on the information of the current node and the processing requirement of the service, further comprising: When the processing timing of the service is the next execution, after obtaining the data corresponding to the current node from the update data, the data corresponding to the current node is saved in the cache; After the service is started next time, the data corresponding to the current node is sent to the service.

9. The method according to any one of claims 1 to 3, further comprising performing at least one of the following steps based on the protocol: Register the relationship between each business and the key it wants to monitor; Set the processing priority for each business; Set the processing time for each business.

10. A service processing device, comprising: An acquisition module is used to acquire data corresponding to the current node based on the information of the current node monitored by the service; A sending module is used to send data corresponding to the current node to the business based on the information of the current node and the processing requirements of the business; wherein the business includes a business component in the client, and the current node includes a node in a tree structure, and the tree structure is established based on the relationship between each business of the client and the key to be monitored.

11. The apparatus according to claim 10, further comprising: The traversal module is used to traverse the tree structure in a hierarchical traversal manner to obtain information of a current node monitored by at least one service. The information of each node in the tree structure includes the relationship between the service and the key to be monitored, and the key is used to identify the service switch.

12. The device according to claim 11, wherein The information of each node in the tree structure further includes at least one of the following: a node name, a full path of the node, an array of child nodes of the node, and an array of services of the focused node.

13. The device according to any one of claims 11 to 12, wherein The information of the current node includes the relationship between the business and the key to be monitored. The acquisition module is specifically used to obtain the value corresponding to the key included in the current node from the updated data. The value corresponding to the key included in the current node includes the data corresponding to the current node, and the data corresponding to the current node includes the data required to monitor the business of the current node.

14. The device according to claim 13, wherein The update data includes: network update data and / or local update data of the client.

15. The device according to any one of claims 11 to 12, wherein The processing requirements include processing priorities, and the sending module is specifically used to send data corresponding to the current node to multiple services in sequence according to the processing priorities of multiple services and information of the current node when multiple services monitor the same current node.

16. According to the device according to any one of claims 11 to 12, the processing requirements include a processing timing, and the sending module is specifically used to obtain the data corresponding to the current node from the updated data when the processing timing of the service is this execution, and then send the data corresponding to the current node to the service.

17. According to the device described in any one of claims 11 to 12, the processing requirements include processing timing, and the sending module is further used to, when the processing timing of the service is the next execution, obtain the data corresponding to the current node from the updated data, and save the data corresponding to the current node into the cache; after the service is started next time, send the data corresponding to the current node to the service.

18. The apparatus according to any one of claims 11 to 12, further comprising a registration module, wherein the registration module is configured to perform at least one of the following steps based on a protocol: Register the relationship between each business and the key it wants to monitor; Set the processing priority for each business; Set the processing time for each business.

19. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.

20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 9.

21. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Dynamic configuration management method and system under micro-service framework

    CN112019369A