CN117667400A - Resource processing method, related device, equipment, system and storage medium - Google Patents

Resource processing method, related device, equipment, system and storage medium Download PDF

Info

Publication number
CN117667400A
CN117667400A CN202311649872.6A CN202311649872A CN117667400A CN 117667400 A CN117667400 A CN 117667400A CN 202311649872 A CN202311649872 A CN 202311649872A CN 117667400 A CN117667400 A CN 117667400A
Authority
CN
China
Prior art keywords
resource
node
operation request
target
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311649872.6A
Other languages
Chinese (zh)
Inventor
苗同亚
程磊
朱家泉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
iFlytek Co Ltd
Original Assignee
iFlytek Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by iFlytek Co Ltd filed Critical iFlytek Co Ltd
Priority to CN202311649872.6A priority Critical patent/CN117667400A/en
Publication of CN117667400A publication Critical patent/CN117667400A/en
Pending legal-status Critical Current

Links

Abstract

The application discloses a resource processing method, and related devices, equipment, a system and a storage medium, wherein the resource processing method comprises the following steps: receiving a first operation request of a service terminal to a target resource; analyzing the first operation request based on resource maintenance information pre-configured in a central node, and determining a data node where a target resource is located as a target node, and a first connection parameter of the target node and a second connection parameter of the target resource; constructing a second operation request based on the first connection parameter and the second connection parameter; based on the first connection parameter in the second operation request, sending the second operation request to the target node; and the target node executes the operation on the target resource at least based on the second connection parameter in the second operation request. By the scheme, in the multi-node system, the usability and maintainability of the system can be improved.

Description

Resource processing method, related device, equipment, system and storage medium
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a resource processing method, and related devices, apparatuses, systems, and storage media.
Background
With the development of artificial intelligence and the increasing growth of services, in order to carry out overall management on each service intelligently and in a light manner, each system and subsystem are not limited in the inner layer of the service. For single service application, the data management can be carried out by independently constructing corresponding systems so as to achieve the purpose of maintaining service functions. However, in a practical scenario, the complexity of the service tends to be much higher than this. Such as multi-node data management for larger traffic volume scenarios, etc.
In the prior art, the technical scheme mainly adopts the following steps of respectively managing single environments and carrying out cloud centralized hybrid management on each node single environment. However, this architecture manner cannot meet the problem of unified management and iterative upgrade of multi-point services, resulting in more difficult use of the system and poor maintainability. In view of this, it is an object of the present invention to provide a system capable of improving system usability and maintainability in a multi-node system.
Disclosure of Invention
The technical problem that this application mainly solves is to provide a resource processing method and related device, equipment, system and storage medium, can promote system usability and maintainability in multinode system.
In order to solve the above technical problem, a first aspect of the present application provides a resource processing method, including: receiving a first operation request of a service terminal to a target resource; analyzing the first operation request based on resource maintenance information pre-configured in a central node, and determining a data node where a target resource is located as a target node, and a first connection parameter of the target node and a second connection parameter of the target resource; constructing a second operation request based on the first connection parameter and the second connection parameter; based on the first connection parameter in the second operation request, sending the second operation request to the target node; and the target node executes the operation on the target resource at least based on the second connection parameter in the second operation request.
In order to solve the above technical problem, a second aspect of the present application provides a resource processing method, including: constructing a first operation request for the target resource; sending a first operation request to a central node; the method comprises the steps that a first operation request is analyzed by resource maintenance information pre-configured by a central node, a data node where a target resource is located is determined to serve as the target node, a first connection parameter of the target node and a second connection parameter of the target resource, a second operation request is constructed based on the first connection parameter and the second connection parameter, the second operation request is sent to the target node based on the first connection parameter in the second operation request, and the target node executes operation on the target resource at least based on the second connection parameter in the second operation request.
In order to solve the above technical problem, a third aspect of the present application provides a resource processing method, including: receiving a second operation request constructed by the central node in response to the first operation request; the first operation is an operation request of the service terminal for the target resource, the second operation request is constructed and obtained based on a first connection parameter of the target node and a second connection parameter of the target resource, the target node is a data node where the target resource is located, the second operation request is sent to the target node based on the first connection parameter, and the first operation request, the first connection parameter and the second connection parameter are obtained by analyzing the first operation request by the center node based on the pre-configured resource maintenance information; and executing the operation on the target resource at least based on the second connection parameter in the second operation request.
In order to solve the above technical problem, a fourth aspect of the present application provides a resource processing device, including: the system comprises a receiving module, an analyzing module, a constructing module and a sending module, wherein the receiving module is used for receiving a first operation request of a service terminal on a target resource; the analysis module is used for analyzing the first operation request based on the resource maintenance information pre-configured in the central node and determining the data node where the target resource is located as the target node and the first connection parameter of the target node and the second connection parameter of the target resource; the construction module is used for constructing a second operation request based on the first connection parameter and the second connection parameter; the sending module is used for sending the second operation request to the target node based on the first connection parameter in the second operation request; and the target node executes the operation on the target resource at least based on the second connection parameter in the second operation request.
In order to solve the above technical problem, a fifth aspect of the present application provides a resource processing device, including: the system comprises a construction module and a sending module, wherein the construction module is used for constructing a first operation request for a target resource; the sending module is used for sending a first operation request to the central node; the method comprises the steps that a first operation request is analyzed by resource maintenance information pre-configured by a central node, a data node where a target resource is located is determined to serve as the target node, a first connection parameter of the target node and a second connection parameter of the target resource, a second operation request is constructed based on the first connection parameter and the second connection parameter, the second operation request is sent to the target node based on the first connection parameter in the second operation request, and the target node executes operation on the target resource at least based on the second connection parameter in the second operation request.
In order to solve the above technical problem, a sixth aspect of the present application provides a resource processing device, including: the system comprises a receiving module and an executing module, wherein the receiving module is used for receiving a second operation request constructed by responding to the first operation request from a central node; the first operation is an operation request of the service terminal for the target resource, the second operation request is constructed and obtained based on a first connection parameter of the target node and a second connection parameter of the target resource, the target node is a data node where the target resource is located, the second operation request is sent to the target node based on the first connection parameter, and the first operation request, the first connection parameter and the second connection parameter are obtained by analyzing the first operation request by the center node based on the pre-configured resource maintenance information; and the execution module is used for executing the operation on the target resource at least based on the second connection parameter in the second operation request.
In order to solve the above technical problem, a seventh aspect of the present application provides an electronic device, which includes a communication circuit, a memory, and a processor, where the communication circuit and the memory are respectively coupled to the processor, the memory stores program instructions, and the processor is configured to execute the program instructions to implement the resource processing method in any one of the above aspects.
In order to solve the above technical problem, an eighth aspect of the present application provides a resource processing system, including a central node, and a service terminal and a data node that are respectively connected with the central node in a communication manner; wherein the central node is configured to perform the resource processing method in the first aspect, the service terminal is configured to perform the resource processing method in the second aspect, and the data node is configured to perform the resource processing method in the third aspect.
In order to solve the above technical problem, a ninth aspect of the present application provides a computer readable storage medium storing program instructions executable by a processor, where the program instructions are configured to implement the resource processing method of any one of the above aspects.
According to the scheme, the first operation request of the service terminal for the target resource is received, the first operation request is analyzed based on the resource maintenance information pre-configured in the center node, the data node where the target resource is located is obtained as the target node, the first connection parameter of the target node and the second connection parameter of the target resource, the second operation request is constructed based on the first connection parameter and the second connection parameter, the second operation request is sent to the target node based on the first connection parameter in the second operation request, and then the target node performs operation on the target resource at least based on the second connection parameter in the second operation request, so that the service terminal is transferred and reconstructed to the operation request of the target resource by the center node by setting the center node and uniformly configuring the resource maintenance information at the center node, and the service terminal is not required to directly butt-joint the data node, so that the service terminals and the data node are fully decoupled, unified management of multiple office points is realized through the center node, configuration information of the center node is only required to be updated during iterative upgrade, and maintenance of the service terminals is not required to be respectively upgraded. Therefore, in the multi-node system, the usability and maintainability of the system can be improved.
Drawings
FIG. 1 is a flow chart of an embodiment of a resource processing method of the present application;
FIG. 2 is a schematic diagram of a framework of one embodiment of a resource processing system of the present application;
FIG. 3 is a process diagram of one embodiment of a business center based dependent jar wrapper resource operation;
FIG. 4 is a schematic diagram of a framework of one embodiment of the resource maintenance information of the present application;
FIG. 5 is a process diagram of one embodiment of a resource processing method of the present application;
FIG. 6 is a process schematic diagram of another embodiment of a resource processing method of the present application;
FIG. 7 is a process schematic diagram of yet another embodiment of a resource processing method of the present application;
FIG. 8 is a flow chart of another embodiment of a resource processing method of the present application;
FIG. 9 is a flow chart of a further embodiment of a resource processing method of the present application;
FIG. 10 is a schematic diagram of a framework of one embodiment of a resource processing device of the present application;
FIG. 11 is a schematic diagram of a framework of another embodiment of a resource processing device of the present application;
FIG. 12 is a schematic diagram of a framework of yet another embodiment of a resource processing device of the present application;
FIG. 13 is a schematic diagram of a frame of an embodiment of an electronic device of the present application;
FIG. 14 is a schematic diagram of a framework of one embodiment of a computer readable storage medium of the present application.
Detailed Description
The following describes the embodiments of the present application in detail with reference to the drawings.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, interfaces, techniques, etc., in order to provide a thorough understanding of the present application.
The terms "system" and "network" are often used interchangeably herein. The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the term "/" herein generally indicates that the associated object is an "or" relationship. Further, "a plurality" herein means two or more than two.
Referring to fig. 1, fig. 1 is a flow chart illustrating an embodiment of a resource processing method of the present application. It should be noted that, in the embodiments of the present disclosure, the flow steps may be performed by a central node. Specifically, embodiments of the present disclosure may include the steps of:
step S11: and receiving a first operation request of the business terminal to the target resource.
In one implementation scenario, the service terminal may select a corresponding resource operation according to a specific service. Illustratively, may include, but are not limited to: CRUD (i.e., create, retrieve, update, delete) of data resources, request initiation, etc., without limitation herein.
In one implementation scenario, please refer to fig. 2 in combination for ease of understanding, fig. 2 is a schematic diagram of an embodiment of the resource processing system of the present application. As shown in fig. 2, the resource processing system may include a central node, and service terminals and data nodes communicatively connected to the central node, respectively. The service terminals can process the same type of service or different types of service. Furthermore, several resources may be included under the data node, such as may include, but not be limited to: databases, files, etc., are not limited herein. The specific meaning of the resource processing system may refer to the following related disclosure embodiments, which are not described herein.
In one implementation scenario, for a service terminal, the data nodes involved, e.g., databases, files, etc., may be uniformly defined as resources. Specifically, various types of resources may be defined in a constraint manner, such as a database class, a file class, etc., which is not limited herein. It should be noted that the unified definition of each resource is beneficial to the data design of the central node, so that the resources are managed in a unified way. Referring to Table 1 in combination, table 1 is a schematic representation of one embodiment of a resource definition. As shown in table 1, the database class resources may include structured databases such as mysql, and unstructured databases such as redis, mongodb, elasticsearch, the file class resources may include pictures such as jpg, jpeg, png, gif, APKs such as APK, zip, bin, and media such as mp3, mp4, mov, wav, pag, pcm, and scripts such as shell, python, and the network protocol class resources may include simple request protocols such as http, https, and the like. Of course, the examples shown in table 1 and described above are only one possible arrangement in the practical application process, and are not limited to specific definition of resources.
Table 1 resource definition schematic table of an embodiment
In one implementation scenario, in order to facilitate the service terminal to construct the first operation request for the target resource, a dependency packet of the central node may be preconfigured in the service terminal, and then the service terminal encapsulates the resource operation that needs to be executed for the target resource based on the dependency packet, to obtain the first operation request. The dependency package may be set according to the configuration environment of the service terminal, for example. For example, in the case that the configuration environment of the service terminal is java, the dependent packet may be specifically a dependent jar packet. Other situations can be similar and are not exemplified here. According to the mode, the service terminal is provided with the relying package of the center node, so that the service terminal encapsulates the resource operation required to be executed by the target resource based on the relying package to obtain the first operation request, the protocol complexity of the center node can be shielded, the service terminal can be conveniently used in an integrated mode, the service access efficiency can be improved, and the data management complexity can be reduced.
In a specific implementation scenario, taking a dependency packet as an example of a dependency jar packet, referring to fig. 3 in combination, fig. 3 is a process schematic diagram of an embodiment of a business center based dependency jar packet package resource operation. As shown in fig. 3, a first function that depends on the jar packet to match the resource type of the target resource may be called first to obtain the proxy class of the target resource, so as to initialize the service configuration in the thread cache. Taking the resource type of the target resource as an unstructured database rediss as an example, the first function matched with the resource type may be getRedisCommandProxy. In the case that the resource type of the target resource is other types, the first function may be determined by analogy, which will not be described in detail herein. It should be noted that, the proxy class is mainly responsible for preprocessing the message for the proxy class, filtering the message, forwarding the message to the proxy class, post-processing the message, and the like, and specific details related to the java proxy can be referred to, which will not be described herein. On the basis, a second function which depends on a dynamic proxy mechanism in the jar packet can be called, and the resource operation initiated by the service terminal is collected and temporarily stored in the thread cache. Still taking the example that the resource operation is redis operation, the resource operation initiated by the service terminal can be collected by relying on the Involution handler in the jar packet as a second function. Finally, in response to the execution instruction, the resource operation temporarily stored in the thread cache may be encapsulated as a first operation request, and then the thread cache may be cleared. In addition, in particular, in addition to the naming protocol for the redis parameter, a varargsIndex parameter may be added for defining a variable parameter at the time of execution of the reflection, which parameter indicates no variable parameter when it is set to-1, and indicates a variable parameter position when it is set to 0. According to the method, when the dependent packet is the dependent jar packet, the first function matched with the resource type of the target resource is called, the proxy class of the target resource is obtained, service configuration is initialized in the thread cache, the second function of the dynamic proxy mechanism in the dependent jar packet is called, resource operation initiated by the service terminal is collected and temporarily stored in the thread cache, accordingly, the resource operation temporarily stored in the thread cache is packaged to serve as a first operation request in response to an execution instruction, the thread cache is cleared, and further automatic packaging of the resource operation in the service terminal can be achieved through the proxy mechanism to obtain the first operation request, so that service access efficiency is improved, and data management complexity is reduced.
In a specific implementation scenario, in order to facilitate the service terminal to smoothly access the first operation request to the central node, so that the central node processes after receiving the first operation request, the service terminal may be further configured with a central node protocol in advance, and the first operation request may be configured based on the central node protocol. It should be noted that, the service terminal may call the central node protocol to encapsulate and obtain the first operation request conforming to the interaction specification of the central node. In particular, the final protocol may be defined by constraining the traffic type and the data type, as well as the protocol corresponding to the data operation. For ease of description, please refer to table 2 in conjunction with the redis resource operation, table 2 is a schematic diagram of an embodiment of the central node protocol message body parameters.
Table 2 schematic table of an embodiment of the central node protocol message body parameters
As shown in table 2, the message body of the central node protocol may include the following parameters: the channel ID and the businessPlatform can distinguish different data nodes so as to realize the data node where the target resource is located. In addition, the message body of the central node protocol can also include the following parameters: businessType (i.e., traffic type), dataType (i.e., resource type of target resource, such as structured database, unstructured database, etc.), commands (i.e., resource operation, such as for redis, i.e., redis operation). More specifically, for parameters commands in the message body of the central node protocol, reference may be made specifically to table 3. Table 3 is a schematic representation of an embodiment of parameter commands parameters in the message body of the hub node protocol.
Table 3 schematic table of an embodiment of parameter commands parameters in the message body of the hub node protocol
Parameters (parameters) Type(s) Must be filled with Description of the invention
className String Is that Class name or interface name
methodName String Is that Method name
parameterTypes Class[] Whether or not List of method parameter types
params Object[] Whether or not Method parameter value list
varArgsIndex int Is that Variable parameter index position, -1 indicates no variable parameter
As shown in table 3, the commands parameters may specifically include, but are not limited to, the following parameters: className (for class name or interface name), methodName (i.e. method name), parametertype (i.e. list of method parameter types), params (i.e. list of method parameter values), varasIndex (variable parameter index position, see for details the above related description). Of course, the above examples are only possible settings of an embodiment of parameters in the message body of the central node protocol, and thus do not limit the specific settings of the central node protocol. As one possible setting manner, in the case where the parameters in the message body of the central node protocol adopt the setting manners shown in the above table 1 and table 2, the central node protocol may be expressed as the following possible examples:
of course, the above-illustrated example is only one possible arrangement in which the parameters in the message body of the central node protocol are set in the arrangements shown in the above tables 1 and 2, and is not limited to the specific representation of the central node protocol. In addition, in the case that the parameters in the message body of the central node protocol adopt other setting manners, the specific representation can be similar, and the examples are not repeated here.
Step S12: and analyzing the first operation request based on the resource maintenance information pre-configured in the central node, and determining the data node where the target resource is located as the target node, and the first connection parameter of the target node and the second connection parameter of the target resource.
In an implementation scenario, the resource maintenance information may specifically include proxy configuration information of each data node, and then the proxy configuration information may be selected as target configuration information based on a matching result between classification information of the target node and each proxy configuration information, and the classification information of the target node may be obtained by analyzing the first operation request, then the data node to which the target configuration information belongs is determined as the target node, and connection parameters defined by the target configuration information are obtained as the first connection parameters. According to the method, through a series of processes of information matching, node determination, parameter extraction and the like, the data node where the target resource is located is determined and is used as the target node and the connection parameter of the target node, on one hand, service efficiency can be improved, on the other hand, each agent configuration information is maintained by the center node, so that the corresponding agent configuration information is directly updated at the center node when the data node changes, and maintainability is further improved.
In a specific implementation scenario, as described in the foregoing central node protocol, the central node protocol is invoked by the service terminal to encapsulate the resource operation to form a first operation request, and as shown in the foregoing table 2, the first operation request may be parsed to obtain a parameter channel id (i.e. a channel) and a parameter bussiness platform (i.e. a platform) in the message body, which are used as classification information of the target resource. Of course, when other fields are used in the message body, the message body can be similarly analyzed to obtain classification information, which is not illustrated here.
In a specific implementation scenario, the proxy configuration information may specifically be provided with a dimension field, where the dimension field and the classification information each contain multiple levels of dimensions for distinguishing data nodes. Illustratively, the multi-level dimension may include, but is not limited to: primary dimension (e.g., channel), secondary dimension (e.g., platform), etc. Referring to Table 4, table 4 is a schematic representation of one embodiment of proxy configuration information.
Table 4 schematic table of an embodiment of proxy configuration information
Fields Description of the invention
ID Unique primary key
Channel First-order dimension of differentiated nodes
Platform Second-order dimension of distinguishing nodes
Data node service Access address for specific data services
Private key For access security
Timeout of time Forwarding requests allows latency
Encryption algorithm Encryption algorithm for data transmission
As shown in table 4, the proxy configuration information of the data node may specifically include: an ID (i.e., a unique primary key, as a unique identifier that distinguishes between different agent configuration information), a channel (i.e., a primary dimension), a platform (i.e., a secondary dimension), a data node service (i.e., an access address for the data service), a private key (for access security), a timeout (i.e., a forwarding request allows latency), an encryption algorithm (i.e., an encryption algorithm for data transmission). It should be noted that, the proxy configuration information core maintains access address information of the corresponding node, and configuration of the required access service. The definition of the private key is used to enhance the security of the data (see more particularly the following description, which will not be repeated here), so that the data operation of the node only receives the request initiated from the central node. Encryption algorithms are used to further enhance the security of the data transfer process, as may be employed including, but not limited to: BASE64, AES, etc. In addition, the declaration of channels and platforms is mainly used for distinguishing the dimension of the nodes, and in principle, two fields can be kept unique in combination, and specific contents are not limited herein.
In one particular implementation, as previously described, the proxy configuration information may be provided with a dimension field, and both the dimension field and the classification information contain multiple levels of dimensions for distinguishing data nodes. Based on the above, the dimension can be matched with the dimension field in each agent configuration information step by step based on the classification information, so as to obtain the matching result of the corresponding agent configuration information, and then the agent configuration information is selected as the target configuration information in response to the matching result of the agent configuration information including successful matching of each level of dimension. Taking the agent configuration information shown in table 4 as an example, after the target configuration information is selected, a specific parameter value of the field "data node service" defined in the first configuration may be used as the first connection parameter. Of course, in the case where the proxy configuration information is different from the example shown in table 4, the determination manner of the first connection parameter may be obtained in the same manner, and no example is given here. According to the method, the target configuration information is obtained through step-by-step matching and determination of the dimension fields, and accuracy of determining the target node and the connection parameters of the target node can be improved.
In an implementation scenario, the resource maintenance information may further include service mapping information and resource configuration information of each resource, and then the service mapping information may be selected as the target mapping information based on a matching result between the identification information of the target resource and each service mapping information, and the identification information may specifically include: the classification information of the target node and the resource type of the target resource are used for checking the service type of the operation request, and the identification information can be obtained by analyzing the first operation request. On the basis, the second connection parameters of the target resources can be obtained based on the resource configuration information of the resources to which the target mapping information belongs. According to the method, the target mapping information is selected through information matching, so that the second connection parameter of the target resource is obtained according to the resource configuration information of the resource to which the target mapping information belongs, on one hand, the service efficiency can be improved, and on the other hand, the center node maintains each service mapping information and resource configuration information, so that the corresponding service mapping information and resource configuration information can be directly updated at the center node when the data node changes, and the maintainability can be further improved.
In a specific implementation scenario, please refer to fig. 4 in combination, fig. 4 is a schematic diagram of a framework of an embodiment of the resource maintenance information of the present application. As shown in fig. 4, the service mapping information is associated with the aforementioned proxy configuration information through dimensions (e.g., the aforementioned channel and platform two-level dimensions), and the service mapping information and the resource configuration information may be associated through IDs. It should be noted that the resource configuration information is a set of configuration information of a series of resources such as redis, mysql, mogodb. Referring to table 5 in combination, table 5 is a schematic representation of one embodiment of traffic mapping information. As mentioned before, the service mapping information and the agent configuration information are associated by dimension, that is, the service mapping information may also include dimension fields, such as channels, platforms, and the like, which characterize multi-level dimensions. In addition, the service mapping information may further include a service type, a data type, and a data ID. The specific meaning of the former two refers to the related description of the message body of the central node protocol, and is not repeated herein. In addition, the data ID characterizes a specific ID foreign key of the resource, which is used to uniquely identify the resource.
Table 5 schematic table of an embodiment of traffic mapping information
Fields Description of the invention
ID Unique primary key
Channel First-order dimension of differentiated nodes
Platform Second-order dimension of distinguishing nodes
Service type Service corresponds to a specific component
Data type The specific category of resources
Data ID Resource specific ID foreign key
It should be noted that, the service type may be specifically defined according to the access, and only one service type may be maintained. The service mapping information is essentially used to associate data configurations with the service, thereby being able to both maintain independent maintenance of the data configurations and dynamically associate the service with the configurations. With continued reference to Table 6, table 6 is a schematic representation of one embodiment of resource allocation information. As described above, the resource configuration information and the service mapping information are associated by ID, that is, the resource configuration information may include an ID field characterizing the data ID shown in table 5, so that the service mapping information is associated with the resource configuration information. With continued reference to table 6, the resource configuration information may also include, but is not limited to, the following fields: modes (i.e., resource deployment modes, which may include, but are not limited to, single point, master-slave+sentinel, cluster, etc.), as well as connection information such as host (i.e., resource access IP address), port (i.e., resource access port number), password (i.e., password for resource), timeout (i.e., timeout time for resource connection), database number (e.g., corresponding redisdb), service name (e.g., redisservice name), etc. Of course, table 6 shows only one possible example of the resource configuration information in the actual application process, and thus, other possible settings of the resource configuration information are not limited.
TABLE 6 schematic form of an embodiment of resource configuration information
Fields Description of the invention
ID Unique primary key (service data source table associated with this id)
Mode redis service mode:sentinel/cluster
host machine Resource access IP address
Port (port) Resource access port number
Password code Resource password
Timeout of time Timeout time for resource connection
Database numbering Corresponding redisdb
Service name Redis service name
In a specific implementation scenario, after the identification information of the target resource is obtained by parsing, the identification information can be matched with fields such as channels, platforms, service types, data types and the like shown in table 5 in each service mapping information, and when the fields in a certain service mapping information are successfully matched with the identification information, the service mapping information can be selected as the target mapping information. On this basis, the data ID in the target mapping information may be acquired, and in a case where the ID field in table 6 matches the data ID in the target mapping information in a certain resource configuration information, the resource configuration information is selected, and the resource configuration information is parsed, and connection information such as a host, a port, a password, a timeout, a database number, a service name, and the like therein is acquired as the second connection parameter.
Step S13: the second operation request is constructed based on the first connection parameter and the second connection parameter.
In one implementation scenario, the uniform resource identifier may be obtained based on the access address defined in the first connection parameter, and the message header used as the authentication parameter is obtained based on the current time, the service unit number of the first operation request, the encryption algorithm and the private key defined in the first connection parameter, and the second connection parameter is encrypted based on the encryption algorithm to obtain the message body, where the authentication parameter is used for accessing the target node. On this basis, the second operation request may be constructed based on the uniform resource identifier, the message header, and the message body. According to the mode, through the first connection parameters and the second connection parameters, the uniform resource identifier, the message header and the message body of the second operation request are determined, and the second operation request is constructed according to the uniform resource identifier, the message header and the message body, so that the second operation request can be standardized as much as possible, and the interaction efficiency between the center node and the data node can be improved.
In a specific real scenario, the access address may refer specifically to the field "data node service" in table 4 and its related description, which are not described herein. In addition, taking the second operation request as an http post as an example, the uniform resource identifier may be a URL. Other situations can be similar and are not exemplified here.
In one specific implementation scenario, the current time may be obtained by invoking a time stamp function, such as System. For convenience of description, the current time may be expressed in currentTime. Of course, the above-described timestamp function is only one possible example in the practical application process, and other possible functions are not limited thereto.
In a specific implementation scenario, the service number may be obtained by parsing the first operation request. For convenience of description, the service ticket number may be represented as a transactionID. Specifically, the UUID may be removed from the splice to obtain the service ticket number.
In a specific implementation scenario, the private key may refer to the field "private key" in table 4 and its related description, which are not described herein. For convenience of description, the private key may be represented as an appsecret. In addition, the encryption algorithm can be specifically referred to the field "encryption algorithm" in table 4 and its related description, and will not be described herein again. For ease of description, the encryption algorithm may be expressed in algorithm. Of course, the above representation is also only one possible example of a practical application process, and is not limited to the specific representation of the private key and the encryption algorithm.
In a specific implementation scenario, after the above parameters are obtained, a first sub-parameter transactionID may be obtained specifically based on the service ticket number, a second sub-parameter currentTime may be obtained based on the current time, and a third sub-parameter may be obtained by encrypting based on the current time and the private key. Illustratively, if md5 may be used to encrypt the current time and the private key, a third sub-parameter may be obtained, which may be represented as md5util.md5sum (appsecret+curtime), where appsecret is the private key and curtime is the current time. For ease of description, the third sub-parameter may be denoted checkSum. In addition, a fourth sub-parameter algorithm can be obtained based on an encryption algorithm. Based on this, a message header as an authentication parameter can be obtained based on the first sub-parameter transactionID, the second sub-parameter currentTime, the third sub-parameter checkSum, and the fourth sub-parameter algorithm. According to the method, the first sub-parameter is obtained based on the service single number, the second sub-parameter is obtained based on the current time, the third sub-parameter is obtained based on the current time and the encryption of the private key, and the fourth sub-parameter is obtained based on the encryption algorithm, so that the message header serving as the authentication parameter is obtained based on the first sub-parameter, the second sub-parameter, the third sub-parameter and the fourth sub-parameter, and the subsequent security of butt joint with the target node can be improved.
In a specific implementation scenario, the second connection parameter may be encrypted according to the fourth sub-parameter algorithm, using an algorithm such as BASE64, AES, or the like, to obtain a message body.
In a specific implementation scenario, taking the second operation request as an http post as an example, after the uniform resource identifier, the message header and the message body are obtained, the second operation request can be constructed and obtained. Other situations can be similar and are not exemplified here.
In another implementation scenario, please refer to fig. 5 in combination, fig. 5 is a process schematic diagram of an embodiment of a resource processing method of the present application. As shown in fig. 5, before analyzing the first operation request based on the resource maintenance information (such as the proxy configuration information, the service mapping information, and the resource configuration information) preconfigured in the central node and determining the data node where the target resource is located as the target node and the first connection parameter of the target node and the second connection parameter of the target resource, at least the classification information of the target node may be checked first, and the classification information may be obtained by analyzing the first operation request as described above. As shown in fig. 5, classification information including multiple dimensions, such as channelID, businessPlatform, may be checked, and if the verification passes, the first operation request may be further parsed by the service mapping information (e.g. "service data mapping table" in fig. 5) and the resource configuration information may be connected in parallel to obtain a second connection parameter, and the first operation request may be parsed by the proxy configuration information (e.g. "data proxy configuration table" in fig. 5) to obtain the first connection parameter, and the authentication parameter and encryption information may be initialized accordingly to construct a second operation request, such as http post. According to the method, before the first connection parameter and the second connection parameter are analyzed, at least the classification information of the target node is checked, and the classification information is obtained by analyzing the first operation request, so that the fact that the follow-up analysis flow can be continuously triggered by the center node only by the first operation request which is qualified by the service terminal can be ensured, and the processing efficiency of the center node is improved.
In yet another implementation scenario, in order to improve the docking efficiency of the central node for subsequent interaction with the data node through the second operation request, a data node protocol for accessing the data node is preconfigured in the central node, so that the second operation request is constructed based on the data node protocol. It should be noted that, the central node may call the data node protocol to encapsulate the second operation request that meets the interaction specification of the data node. Specifically, the verification of data can be performed through the agreed private key encryption information, and the connection of resources and the execution of operations can be performed. Referring to table 7 in combination, table 7 is a schematic representation of one embodiment of message body parameters for a data node protocol. As shown in table 7, the message body of the data center protocol may include, but is not limited to, the following parameters: config (e.g., redis configuration information), commands (e.g., redis operation set), etc., without limitation.
Table 7 schematic table of one embodiment of message body parameters for data node protocol
Parameters (parameters) Type(s) Must be filled with Description of the invention
config Config Is that Redis configuration information
commands List<Command> Is that Set of redis operations (see Table 3 above)
With continued reference to Table 8, table 8 is a schematic representation of one embodiment of the parameter config in the message body of the data center protocol. As shown in table 8, the parameters config may include, but are not limited to, the following parameters: model (i.e., mode, redis mode as listed in table 6), host (i.e., host), port (i.e., port), password (i.e., password), timeout (i.e., timeout), sendingmasterid (i.e., master node ID in sentinel mode), database (i.e., library number). Specific meanings can be found in table 6 and the related descriptions thereof, and are not described in detail herein.
Table 8 data center protocol schematic table of an embodiment of the parameter config in its message body
In addition, as one possible setting manner, in the case where the parameters in the message body of the data node protocol adopt the setting manners shown in the above table 7 and table 8, the data node protocol may be expressed as the following possible examples:
of course, the above-illustrated example is only one possible arrangement of the parameters in the message body of the data node protocol in the arrangement shown in the above-described table 7 and table 8, and is not limited to the specific representation of the data node protocol. In addition, in the case that the parameters in the message body of the data node protocol adopt other setting manners, the specific representation can be similar, and the examples are not repeated here.
Step 14: and sending the second operation request to the target node based on the first connection parameter in the second operation request.
In the embodiment of the disclosure, the target node performs an operation on the target resource based at least on the second connection parameter in the second operation request. That is, the central node may send the second operation request to the target node according to the first connection parameter definition (e.g., the access address in table 4 and the description thereof) in the second operation request, so that the target node may perform an operation on the target resource based on at least the second connection parameter in the second operation request after receiving the second operation request. Specifically, the target node may parse the second operation request to obtain a second connection parameter, and then connect to the target resource based on the second connection parameter, so that an operation may be performed on the target resource based on a data resource protocol of the target resource. It should be noted that, the data node may be preconfigured with a data resource protocol of various resources. The data resource protocol is called by the central node, and data verification is carried out by agreeing with private key encryption information, and the operation of resource connection is executed. Illustratively, may include, but are not limited to: the redis-related protocol, mysql-related protocol, etc., are not limited herein. According to the method, the second connection parameters are obtained through analyzing the second operation request, and the second connection parameters are connected to the target resources based on the second connection parameters, so that the operation is performed on the target resources based on the data resource protocol of the target resources, the service access efficiency is improved, and the complexity of data management is reduced.
In one implementation scenario, please refer to fig. 6 in combination, fig. 6 is a process schematic diagram of another embodiment of the resource processing method of the present application. As described above, the message header of the second operation request may include an authentication parameter, and the message body of the second operation request includes the second connection parameter encrypted by the encryption algorithm, then, as shown in fig. 6, before the second operation request is parsed to obtain the second connection parameter, the message header may be parsed to obtain the authentication parameter, and as described above, the authentication parameter may specifically include a first subparameter that characterizes a service unit number, a second subparameter that characterizes a current time, a third subparameter that is encrypted based on the current time and a private key, and a fourth subparameter that characterizes the encryption algorithm. Based on the authentication result, the authentication result can be obtained by carrying out security authentication based on the first sub-parameter, the second sub-parameter and the third sub-parameter, so that the message body can be decrypted based on a decryption algorithm adapted to the encryption algorithm to obtain the second connection parameter in response to the authentication result including successful authentication. According to the method, before the second connection parameters are obtained through analysis, the message header is analyzed to obtain the authentication parameters, and then safety authentication is carried out based on the authentication parameters, so that the second connection parameters are obtained through analysis under the condition that the authentication result comprises authentication success, and the safety of accessing the target resources is improved.
In a specific implementation scenario, please continue to refer to fig. 6, before authentication, it may be referred to whether an authentication switch (e.g. api. Auth. Enable) in a configuration file (e.g. application. Properties file) is still in an open state, if so, the step of resolving to obtain an authentication parameter may be performed continuously, otherwise, if so, the security authentication may be skipped.
In a specific implementation scenario, after the first sub-parameter, the second sub-parameter, and the third sub-parameter are obtained by parsing, security authentication may be performed. Illustratively, a parameter must pass check (transactionID+currentTime+checkSum) may be authorized; expiration checks (i.e., upper and lower validity periods, such as api. Valid. Term) may also be requested; request uniqueness (i.e., within a certain time interval, such as api. Memory. Expire) may also be checked; key authentication (i.e., MD5 (api. Key+currenttime), where api. Key may be considered a public key) may also be performed. Further, in the case where the authentication result includes authentication failure, the flow may be ended.
In a specific implementation scenario, in the case that the authentication result includes authentication success, it may also be determined whether to skip data decryption. Similarly to the foregoing determination as to whether to skip authentication, it is possible to refer to whether a decryption switch (e.g., api. Decryption. Enable) in the configuration file is in an on state, and if so, the decryption process may be continued, otherwise, if so, the decryption process may be skipped.
In a specific implementation scenario, the message body may be decrypted using a decryption parameter that is adapted to the header encryption parameter algorithm (i.e., the third subparameter described above) to obtain the second connection parameter. Illustratively, as may include, but is not limited to: AES, BASE64, etc., are not limited herein. In addition, in the case of decryption failure, the flow may be ended.
In a specific implementation scenario, the verification of the second connection parameter may also be continued in case the decryption is successful. Illustratively, the validity of the second connection parameter may be checked, as may be noted; the code logic layer may also determine the validity of the second connection parameter. In addition, in the case of a verification failure, the flow may be ended.
In one implementation scenario, after the execution of the target resource is completed, the data node may also return the execution result of the target resource to the service terminal through the central node. Of course, the data node may also be disconnected from the target resource after the execution result is obtained.
Please refer to fig. 7 in combination, fig. 7 is a process diagram illustrating another embodiment of the resource processing method of the present application. As shown in fig. 7, a service terminal may integrate a dependency jar packet of a central node, and process the dependency jar packet through a resource operation mode provided in the dependency jar packet of the central node, and the service terminal may invoke a central node protocol in a data distribution protocol, and combine the dependency jar packet to package a resource operation itself to conform to a first operation request interacted with the central node. On this basis, the central node may only receive and process the first operation request of the upstream jar, obtain, according to the resource maintenance information (the proxy configuration information, the service mapping information associated with the proxy configuration information through the dimension, and the resource configuration information associated with the service mapping information through the ID), the target data node of the resource operation and the resource information (i.e. the aforementioned first connection parameter and the second connection parameter) required to be operated, and encapsulate and encrypt the data again according to the data node protocol in the data distribution protocol, so as to obtain the second operation request conforming to the interaction with the data node, so as to distribute the second operation request to the target data node. And for the data node, after a series of actions such as checking, analyzing and decrypting the second operation request and acquiring the data resource information can be performed, connection and execution operations can be performed according to the original protocol (namely the data resource protocol) of the data resource, and execution results are traced back to the upstream of the request until the service initiation side, so that on one hand, the bottom data connection protocol can be shielded, only the unified data distribution protocol is exposed, the effectiveness of resource management is improved in a multi-node scene, the possibility of confusion is reduced as much as possible, on the other hand, through secondary encapsulation of the operation request, the operation request can be continuously circulated at the service terminal, the center node and the target resource, and resource maintenance information is uniformly configured at the center node without directly butting the data node by each service terminal, on the other hand, the service terminal and each data node can be fully decoupled, and on the other hand, the service side can be conveniently integrated and used by configuring the center node to rely on a jar packet, so that the protocol complexity of the center node can be shielded.
According to the scheme, the first operation request of the service terminal for the target resource is received, the first operation request is analyzed based on the resource maintenance information pre-configured in the center node, the data node where the target resource is located is obtained as the target node, the first connection parameter of the target node and the second connection parameter of the target resource, the second operation request is constructed based on the first connection parameter and the second connection parameter, the second operation request is sent to the target node based on the first connection parameter in the second operation request, and then the target node performs operation on the target resource at least based on the second connection parameter in the second operation request, so that the service terminal is transferred and reconstructed to the operation request of the target resource by the center node by setting the center node and uniformly configuring the resource maintenance information at the center node, and the service terminal is not required to directly butt-joint the data node, so that the service terminals and the data node are fully decoupled, unified management of multiple office points is realized through the center node, configuration information of the center node is only required to be updated during iterative upgrade, and maintenance of the service terminals is not required to be respectively upgraded. Therefore, in the multi-node system, the usability and maintainability of the system can be improved.
Referring to fig. 8, fig. 8 is a flowchart illustrating another embodiment of a resource processing method according to the present application. It should be noted that, in the embodiment of the present disclosure, the flow steps may be performed by the service terminal. Specifically, embodiments of the present disclosure may include the steps of:
step S81: a first operation request for a target resource is constructed.
Reference may be made specifically to the foregoing descriptions of the disclosed embodiments, and details are not repeated herein.
Step S82: and sending a first operation request to the central node.
In the embodiment of the disclosure, the resource maintenance information preconfigured by the central node analyzes the first operation request, determines a data node where the target resource is located as the target node, and a first connection parameter of the target node and a second connection parameter of the target resource, constructs a second operation request based on the first connection parameter and the second connection parameter, and sends the second operation request to the target node based on the first connection parameter in the second operation request, and the target node performs an operation on the target resource based on at least the second connection parameter in the second operation request. Reference may be made specifically to the foregoing descriptions of the disclosed embodiments, and details are not repeated herein.
According to the scheme, the first operation request for the target resource is constructed, the first operation request is sent to the center node, the first operation request is analyzed by the resource maintenance information pre-configured by the center node, the data node where the target resource is located is determined to serve as the target node, the first connection parameter of the target node and the second connection parameter of the target resource, the second operation request is constructed based on the first connection parameter and the second connection parameter, the second operation request is sent to the target node based on the first connection parameter in the second operation request, and the target node executes operation on the target resource at least based on the second connection parameter in the second operation request. Therefore, by setting the center node, uniformly configuring resource maintenance information at the center node, transferring and reconstructing operation requests of the service terminals to the target resources by the center node, without directly butting the data nodes by the service terminals, the service terminals and the data nodes can be fully decoupled, uniform management of multiple office points is realized by the center node, and only the configuration information of the center node is required to be updated during iterative upgrade, so that the service terminals are not required to be respectively upgraded and maintained. Therefore, in the multi-node system, the usability and maintainability of the system can be improved.
Referring to fig. 9, fig. 9 is a flowchart of another embodiment of the resource processing method of the present application. It should be noted that, in the embodiment of the present disclosure, the flow steps are performed by the data node. Specifically, embodiments of the present disclosure may include the steps of:
step S91: a second operation request is received from the central node constructed in response to the first operation request.
In the embodiment of the disclosure, the first operation is an operation request of the service terminal for the target resource, the second operation request is constructed based on a first connection parameter of the target node and a second connection parameter of the target resource, the target node is a data node where the target resource is located, the second operation request is sent to the target node based on the first connection parameter, and the target node, the first connection parameter and the second connection parameter are obtained by analyzing the first operation request by the central node based on the pre-configured resource maintenance information. Reference may be made specifically to the foregoing descriptions of the disclosed embodiments, and details are not repeated herein.
Step S92: and executing the operation on the target resource at least based on the second connection parameter in the second operation request.
Reference may be made specifically to the foregoing descriptions of the disclosed embodiments, and details are not repeated herein.
According to the scheme, the second operation request constructed by the center node in response to the first operation request is received, the first operation is an operation request of the service terminal on the target resource, the second operation request is constructed based on the first connection parameter of the target node and the second connection parameter of the target resource, the target node is a data node where the target resource is located, the second operation request is sent to the target node based on the first connection parameter, the target node, the first connection parameter and the second connection parameter are obtained by analyzing the first operation request by the center node based on the pre-configured resource maintenance information, and then the operation is executed on the target resource based on at least the second connection parameter in the second operation request. Therefore, by setting the center node, uniformly configuring resource maintenance information at the center node, transferring and reconstructing operation requests of the service terminals to the target resources by the center node, without directly butting the data nodes by the service terminals, the service terminals and the data nodes can be fully decoupled, uniform management of multiple office points is realized by the center node, and only the configuration information of the center node is required to be updated during iterative upgrade, so that the service terminals are not required to be respectively upgraded and maintained. Therefore, in the multi-node system, the usability and maintainability of the system can be improved.
Referring to fig. 10, fig. 10 is a schematic diagram illustrating a framework of an embodiment of a resource processing device 100 according to the present application. The resource processing device 100 includes: the system comprises a receiving module 101, an analyzing module 102, a constructing module 103 and a sending module 104, wherein the receiving module 101 is used for receiving a first operation request of a business terminal on a target resource; the parsing module 102 is configured to parse the first operation request based on the resource maintenance information preconfigured in the central node, and determine a data node where the target resource is located as the target node, and a first connection parameter of the target node and a second connection parameter of the target resource; a construction module 103, configured to construct a second operation request based on the first connection parameter and the second connection parameter; a sending module 104, configured to send a second operation request to the target node based on the first connection parameter in the second operation request; and the target node executes the operation on the target resource at least based on the second connection parameter in the second operation request.
According to the scheme, the resource processing device 100 receives the first operation request of the target resource from the service terminal, analyzes the first operation request based on the resource maintenance information pre-configured in the central node, obtains the data node where the target resource is located as the target node and the first connection parameter of the target node and the second connection parameter of the target resource, constructs the second operation request based on the first connection parameter and the second connection parameter, and sends the second operation request to the target node based on the first connection parameter in the second operation request, and then the target node performs operation on the target resource based on at least the second connection parameter in the second operation request. Therefore, in the multi-node system, the usability and maintainability of the system can be improved.
In some disclosed embodiments, the resource maintenance information includes proxy configuration information of each data node, and the parsing module 102 includes a first matching sub-module, configured to select proxy configuration information as target configuration information based on a matching result between classification information of the target node and each proxy configuration information, respectively; the classification information of the target node is obtained by analyzing the first operation request; the parsing module 102 includes a node determining sub-module, configured to determine a data node to which the target configuration information belongs, as a target node; the parsing module 102 includes a parameter obtaining sub-module, configured to obtain connection parameters defined in the target configuration information as first connection parameters.
In some disclosed embodiments, the proxy configuration information is provided with a dimension field, the dimension field and the classification information both comprise multi-level dimensions for distinguishing the data nodes, and the first matching submodule comprises a dimension matching unit for gradually matching the dimensions with the dimension fields in each proxy configuration information based on the classification information respectively to obtain a matching result of the corresponding proxy configuration information; the first matching submodule comprises an information selection unit, and the information selection unit is used for selecting the agent configuration information as target configuration information in response to the matching result of the agent configuration information, wherein the matching result comprises that all levels of dimensions are successfully matched.
In some disclosed embodiments, the resource maintenance information includes service mapping information and resource configuration information of each resource, and the parsing module 102 includes a second matching sub-module, configured to select the service mapping information as target mapping information based on a matching result between the identification information of the target resource and each service mapping information, respectively; wherein the identification information comprises: the method comprises the steps that classification information of a target node, a resource type of a target resource and a service type of a first operation request are obtained through analysis of the first operation request; the parsing module 102 includes a parameter determining sub-module, configured to obtain a second connection parameter of the target resource based on the resource configuration information of the resource to which the target mapping information belongs.
In some disclosed embodiments, the constructing module 103 includes a message obtaining sub-module, configured to obtain a uniform resource identifier based on an access address defined in the first connection parameter, obtain a message header as an authentication parameter based on a current time, a service unit number of the first operation request, an encryption algorithm and a private key defined in the first connection parameter, and encrypt the second connection parameter based on the encryption algorithm to obtain a message body; the authentication parameters are used for accessing the target node; the construction module 103 comprises a request construction sub-module for constructing a second operation request based on the uniform resource identifier, the message header and the message body.
In some disclosed embodiments, the message acquisition sub-module includes a parameter acquisition unit, configured to obtain a first sub-parameter based on a service unit number, obtain a second sub-parameter based on a current time, and encrypt based on the current time and a private key to obtain a third sub-parameter, and obtain a fourth sub-parameter based on an encryption algorithm; the message acquisition sub-module comprises an authentication construction unit for obtaining a message header as an authentication parameter based on the first sub-parameter, the second sub-parameter, the third sub-parameter and the fourth sub-parameter.
In some disclosed embodiments, a data node protocol for accessing the data node is preconfigured at the central node, and the second operation request is structured based on the data node protocol.
In some disclosed embodiments, the resource processing device 100 further includes a verification module, configured to verify at least classification information of the target node before resolving the first operation request based on the resource maintenance information preconfigured in the central node, determining the data node where the target resource is located as the target node, and the first connection parameter of the target node and the second connection parameter of the target resource, where the classification information is obtained by resolving the first operation request.
Referring to fig. 11, fig. 11 is a schematic diagram illustrating a framework of an embodiment of a resource processing device 110 according to the present application. The resource processing device 110 may include: a constructing module 111 and a transmitting module 112, wherein the constructing module 111 is used for constructing a first operation request for a target resource; a sending module 112, configured to send a first operation request to a central node; the method comprises the steps that a first operation request is analyzed by resource maintenance information pre-configured by a central node, a data node where a target resource is located is determined to serve as the target node, a first connection parameter of the target node and a second connection parameter of the target resource, a second operation request is constructed based on the first connection parameter and the second connection parameter, the second operation request is sent to the target node based on the first connection parameter in the second operation request, and the target node executes operation on the target resource at least based on the second connection parameter in the second operation request.
In the above aspect, the resource processing device 110 constructs a first operation request for the target resource, sends the first operation request to the central node, analyzes the first operation request by using the resource maintenance information pre-configured by the central node, determines the data node where the target resource is located as the target node and the first connection parameter of the target node and the second connection parameter of the target resource, constructs the second operation request based on the first connection parameter and the second connection parameter, and sends the second operation request to the target node based on the first connection parameter in the second operation request, and the target node performs an operation on the target resource based on at least the second connection parameter in the second operation request. Therefore, by setting the center node, uniformly configuring resource maintenance information at the center node, transferring and reconstructing operation requests of the service terminals to the target resources by the center node, without directly butting the data nodes by the service terminals, the service terminals and the data nodes can be fully decoupled, uniform management of multiple office points is realized by the center node, and only the configuration information of the center node is required to be updated during iterative upgrade, so that the service terminals are not required to be respectively upgraded and maintained. Therefore, in the multi-node system, the usability and maintainability of the system can be improved.
In some disclosed embodiments, the service terminal is preconfigured with a dependency packet of the central node, and the construction module 111 is specifically configured to encapsulate, based on the dependency packet, a resource operation that needs to be executed by the service terminal on a target resource, so as to obtain a first operation request.
In some disclosed embodiments, the dependency package is a dependency jar package, and the construction module 111 includes a first calling sub-module for calling a first function matching a resource type of the dependency jar package and the target resource, and obtaining a proxy class of the target resource to initialize service configuration in the thread cache; the construction module 111 includes a second invoking sub-module, configured to invoke a second function that depends on a dynamic proxy mechanism in the jar packet, collect a resource operation initiated by the service terminal, and store the resource operation temporarily in the thread cache; the constructing module 111 includes an encapsulating sub-module for encapsulating, in response to an execution instruction, a resource operation temporarily stored in the thread cache as a first operation request, and the constructing module 111 includes a clearing sub-module for clearing the thread cache.
In some disclosed embodiments, the service terminal is preconfigured with a hub node protocol and the first operation request is structured based on the hub node protocol.
Referring to fig. 12, fig. 12 is a schematic diagram illustrating a framework of an embodiment of a resource processing device 120 according to the present application. The resource processing device 120 includes: a receiving module 121 and an executing module 122, the receiving module 121 being configured to receive a second operation request constructed in response to the first operation request from the center node; the first operation is an operation request of the service terminal for the target resource, the second operation request is constructed and obtained based on a first connection parameter of the target node and a second connection parameter of the target resource, the target node is a data node where the target resource is located, the second operation request is sent to the target node based on the first connection parameter, and the first operation request, the first connection parameter and the second connection parameter are obtained by analyzing the first operation request by the center node based on the pre-configured resource maintenance information; the execution module 122 is configured to execute an operation on the target resource based at least on the second connection parameter in the second operation request.
In the above solution, the resource processing device 120 receives a second operation request constructed by the central node in response to the first operation request, where the first operation is an operation request of the service terminal for the target resource, the second operation request is constructed based on a first connection parameter of the target node and a second connection parameter of the target resource, the target node is a data node where the target resource is located, the second operation request is sent to the target node based on the first connection parameter, and the target node, the first connection parameter and the second connection parameter are obtained by analyzing the first operation request by the central node based on the pre-configured resource maintenance information, and then performs an operation on the target resource based on at least the second connection parameter in the second operation request. Therefore, by setting the center node, uniformly configuring resource maintenance information at the center node, transferring and reconstructing operation requests of the service terminals to the target resources by the center node, without directly butting the data nodes by the service terminals, the service terminals and the data nodes can be fully decoupled, uniform management of multiple office points is realized by the center node, and only the configuration information of the center node is required to be updated during iterative upgrade, so that the service terminals are not required to be respectively upgraded and maintained. Therefore, in the multi-node system, the usability and maintainability of the system can be improved.
In some disclosed embodiments, the data node is preconfigured with a data resource protocol of various resources, and the execution module 122 includes a request parsing sub-module configured to parse the second operation request to obtain a second connection parameter; the execution module 122 includes a resource connection sub-module for connecting to the target resource based on the second connection parameter; the execution module 122 includes a resource operation sub-module for performing operations on the target resource based on the data resource protocol of the target resource.
In some disclosed embodiments, the message header of the second operation request includes an authentication parameter, and the message body of the second operation request includes a second connection parameter encrypted by an encryption algorithm, and the execution module 122 includes an authentication parsing sub-module for parsing the message header to obtain the authentication parameter; the authentication parameters comprise a first subparameter for representing a service single number, a second subparameter for representing the current time, a third subparameter obtained based on the current time and the encryption of a private key and a fourth subparameter for representing an encryption algorithm; the execution module 122 includes a security authentication sub-module, configured to perform security authentication based on the first sub-parameter, the second sub-parameter, and the third sub-parameter, to obtain an authentication result; the request analysis submodule is specifically configured to decrypt the message body based on a decryption algorithm adapted to the encryption algorithm to obtain the second connection parameter in response to the authentication result including authentication success.
Referring to fig. 13, fig. 13 is a schematic diagram of a frame of an embodiment of an electronic device 130 of the present application. The electronic device 130 includes a communication circuit 131, a memory 133, and a processor 132, where the communication circuit 131 and the memory 133 are respectively coupled to the processor 132, and the memory 133 stores program instructions, and the processor 132 is configured to execute the program instructions to implement the steps in any of the above-mentioned resource processing method embodiments. Reference may be made specifically to the foregoing disclosed embodiments, and details are not repeated here. The electronic device 130 may include, in particular, but not limited to: servers, smartphones, notebook computers, tablet computers, kiosks, etc., are not limited herein. Note that, the electronic device 130 may be any of a central node, a data node, and a service terminal.
In particular, the processor 132 is operable to control itself and the memory 133 to implement the steps of any of the resource processing method embodiments described above. The processor 132 may also be referred to as a CPU (Central Processing Unit ). The processor 132 may be an integrated circuit chip having signal processing capabilities. The processor 132 may also be a general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 132 may be commonly implemented by an integrated circuit chip.
According to the scheme, the electronic device 130 realizes the steps in any one of the resource processing method embodiments, so that the central node is set, resource maintenance information is uniformly configured at the central node, and operation requests of the service terminals for target resources are transferred and reconstructed by the central node without directly butting data nodes by the service terminals, so that the service terminals and the data nodes can be fully decoupled, uniform management of multiple sites is realized through the central node, and only the configuration information of the central node is required to be updated during iterative upgrade, so that the service terminals are not required to be respectively upgraded and maintained. Therefore, in the multi-node system, the usability and maintainability of the system can be improved.
Referring now to FIG. 2, FIG. 2 is a block diagram illustrating one embodiment of a resource processing system 20. The resource processing system 20 may include: a center node 21, and service terminals 22 and data nodes 23 communicatively connected to the center node 21, respectively. The specific process of the resource processing method executed by the central node 21, the service terminal 22 and the data node 23 respectively may refer to the foregoing disclosed embodiment, and will not be described herein again.
In the above scheme, the resource processing system 20 sets the central node 21 and configures the resource maintenance information uniformly at the central node 21, and transfers and reconstructs the operation request of the service terminal 22 to the target resource by the central node 21, without directly docking the service terminals to the data node 23, so that each service terminal 22 and each data node 23 are fully decoupled, and then uniform management of multiple sites is realized by the central node 21, and only the configuration information of the central node 21 needs to be updated during iterative upgrade, without respectively upgrading and maintaining each service terminal 22. Therefore, in the multi-node system, the usability and maintainability of the system can be improved.
Referring to FIG. 14, FIG. 14 is a schematic diagram illustrating an embodiment of a computer-readable storage medium 140 according to the present application. The computer readable storage medium 140 stores program instructions 141 that can be executed by a processor, the program instructions 141 being used to implement the steps in any of the resource processing method embodiments described above. Reference may be made specifically to the foregoing disclosed embodiments, and details are not repeated here.
In the above solution, the computer readable storage medium 140 implements the steps in any of the embodiments of the resource processing method, so by setting a central node and uniformly configuring resource maintenance information at the central node, transferring and reconstructing an operation request of a service terminal to a target resource by the central node, without directly interfacing each service terminal with a data node, each service terminal and each data node can be fully decoupled, and then uniform management of multiple sites is implemented by the central node, and only configuration information of the central node needs to be updated during iterative upgrade, without respectively upgrading and maintaining each service terminal. Therefore, in the multi-node system, the usability and maintainability of the system can be improved.
In some embodiments, functions or modules included in an apparatus provided by the embodiments of the present disclosure may be used to perform a method described in the foregoing method embodiments, and specific implementations thereof may refer to descriptions of the foregoing method embodiments, which are not repeated herein for brevity.
The foregoing description of various embodiments is intended to highlight differences between the various embodiments, which may be the same or similar to each other by reference, and is not repeated herein for the sake of brevity.
In the several embodiments provided in the present application, it should be understood that the disclosed methods and apparatus may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical, or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all or part of the technical solution contributing to the prior art or in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
If the technical scheme of the application relates to personal information, the product applying the technical scheme of the application clearly informs the personal information processing rule before processing the personal information, and obtains independent consent of the individual. If the technical scheme of the application relates to sensitive personal information, the product applying the technical scheme of the application obtains individual consent before processing the sensitive personal information, and simultaneously meets the requirement of 'explicit consent'. For example, a clear and remarkable mark is set at a personal information acquisition device such as a camera to inform that the personal information acquisition range is entered, personal information is acquired, and if the personal voluntarily enters the acquisition range, the personal information is considered as consent to be acquired; or on the device for processing the personal information, under the condition that obvious identification/information is utilized to inform the personal information processing rule, personal authorization is obtained by popup information or a person is requested to upload personal information and the like; the personal information processing rule may include information such as a personal information processor, a personal information processing purpose, a processing mode, and a type of personal information to be processed.

Claims (17)

1. A method of resource processing, comprising:
Receiving a first operation request of a service terminal to a target resource;
analyzing the first operation request based on resource maintenance information pre-configured in a central node, and determining a data node where the target resource is located as a target node, and a first connection parameter of the target node and a second connection parameter of the target resource;
constructing a second operation request based on the first connection parameter and the second connection parameter;
transmitting the second operation request to the target node based on the first connection parameter in the second operation request; and the target node executes operation on the target resource at least based on the second connection parameter in the second operation request.
2. The method according to claim 1, wherein the resource maintenance information includes proxy configuration information of each data node, the analyzing the first operation request based on the resource maintenance information preconfigured in the central node, and determining the data node where the target resource is located as the target node and the first connection parameter of the target node includes:
selecting the proxy configuration information as target configuration information based on matching results between the classification information of the target node and each proxy configuration information; the classification information of the target node is obtained by analyzing the first operation request;
And determining a data node to which the target configuration information belongs as the target node, and acquiring a connection parameter defined in the target configuration information as the first connection parameter.
3. The method according to claim 2, wherein the proxy configuration information is provided with a dimension field, the dimension field and the classification information each include a multi-level dimension for distinguishing the data nodes, and the selecting the proxy configuration information as the target configuration information based on a matching result between the classification information of the target node and the proxy configuration information of each data node, respectively, includes:
step-by-step matching dimensions with the dimension fields in each agent configuration information based on the classification information to obtain a matching result corresponding to the agent configuration information;
and responding to the matching result of the proxy configuration information, wherein the matching result comprises that all levels of dimensions are successfully matched, and the proxy configuration information is selected as the target configuration information.
4. The method of claim 1, wherein the resource maintenance information includes service mapping information and resource configuration information of each resource, wherein the analyzing the first operation request based on the resource maintenance information preconfigured at the central node, and determining the second connection parameter of the target resource, comprises:
Selecting the service mapping information as target mapping information based on the matching result between the identification information of the target resource and each service mapping information; wherein the identification information includes: the classification information of the target node, the resource type of the target resource and the service type of the first operation request, and the identification information is obtained by analyzing the first operation request;
and obtaining a second connection parameter of the target resource based on the resource configuration information of the resource to which the target mapping information belongs.
5. The method of claim 1, wherein constructing a second operation request based on the first connection parameter and the second connection parameter comprises:
obtaining a uniform resource identifier based on an access address defined in the first connection parameter, obtaining a message header serving as an authentication parameter based on the current time, a service unit number of the first operation request, an encryption algorithm and a private key defined in the first connection parameter, and encrypting the second connection parameter based on the encryption algorithm to obtain a message body; wherein the authentication parameter is used to access the target node;
And constructing the second operation request based on the uniform resource identifier, the message header and the message body.
6. The method of claim 5, wherein the obtaining a message header as an authentication parameter based on the current time, the service ticket number of the first operation request, the encryption algorithm and the private key defined in the first connection parameter, comprises:
obtaining a first sub-parameter based on the service single number, obtaining a second sub-parameter based on the current time, encrypting based on the current time and the private key to obtain a third sub-parameter, and obtaining a fourth sub-parameter based on the encryption algorithm;
and obtaining a message header serving as the authentication parameter based on the first sub-parameter, the second sub-parameter, the third sub-parameter and the fourth sub-parameter.
7. The method according to any one of claims 1 to 6, wherein a data node protocol for accessing the data node is preconfigured at the central node, and the second operation request is constructed based on the data node protocol;
and/or before analyzing the first operation request based on the resource maintenance information preconfigured in the central node and determining the data node where the target resource is located as the target node and the first connection parameter of the target node and the second connection parameter of the target resource, the method further includes: and at least checking the classification information of the target node, wherein the classification information is obtained by analyzing the first operation request.
8. A method of resource processing, comprising:
constructing a first operation request for the target resource;
sending the first operation request to a central node; the central node analyzes the first operation request according to the pre-configured resource maintenance information, determines a data node where the target resource is located as a target node, and a first connection parameter of the target node and a second connection parameter of the target resource, constructs a second operation request based on the first connection parameter and the second connection parameter, and sends the second operation request to the target node based on the first connection parameter in the second operation request, and the target node executes an operation on the target resource based on at least the second connection parameter in the second operation request.
9. The method of claim 8, wherein the service terminal is preconfigured with a dependency package for the central node, and wherein the constructing the first operation request for the target resource comprises:
and packaging the resource operation to be executed by the service terminal on the basis of the dependent package to obtain the first operation request.
10. The method of claim 9, wherein the dependency packet is a dependency jar packet, and the encapsulating, based on the dependency packet, the service terminal on the resource operation that needs to be performed by the target resource, to obtain the first operation request includes:
invoking a first function matched with the resource type of the target resource by the dependent jar packet, and acquiring a proxy class of the target resource so as to initialize service configuration in a thread cache;
invoking a second function of a dynamic proxy mechanism in the dependent jar packet, collecting resource operation initiated by the service terminal and temporarily storing the resource operation in the thread cache;
and responding to an execution instruction, packaging the temporarily stored resource operation in the thread cache as the first operation request, and then clearing the thread cache.
11. The method according to any of claims 8 to 10, wherein the service terminal is preconfigured with a central node protocol and the first operation request is constructed based on the central node protocol.
12. A method of resource processing, comprising:
receiving a second operation request constructed by the central node in response to the first operation request; the first operation is an operation request of a service terminal for a target resource, the second operation request is constructed based on a first connection parameter of a target node and a second connection parameter of the target resource, the target node is a data node where the target resource is located, the second operation request is sent to the target node based on the first connection parameter, and the first operation request, the first connection parameter and the second connection parameter are obtained by analyzing the first operation request by the center node based on pre-configured resource maintenance information;
And executing operation on the target resource at least based on the second connection parameter in the second operation request.
13. The method of claim 12, wherein the data node is preconfigured with a data resource protocol for various resources, and wherein the performing an operation on the target resource based at least on the second connection parameter in the second operation request comprises:
analyzing the second operation request to obtain the second connection parameter;
connecting to the target resource based on the second connection parameter;
and executing operation on the target resource based on the data resource protocol of the target resource.
14. The method of claim 13, wherein the message header of the second operation request includes authentication parameters and the message body of the second operation request includes second connection parameters encrypted by an encryption algorithm, the method further comprising, prior to said parsing the second operation request to obtain the second connection parameters:
analyzing the message header to obtain the authentication parameters; the authentication parameters comprise a first subparameter for representing a service single number, a second subparameter for representing the current time, a third subparameter obtained by encrypting based on the current time and a private key and a fourth subparameter for representing an encryption algorithm;
Performing security authentication based on the first sub-parameter, the second sub-parameter and the third sub-parameter to obtain an authentication result;
and analyzing the second operation request to obtain the second connection parameter, including:
and responding to the authentication result including authentication success, and decrypting the message body based on a decryption algorithm adapted to the encryption algorithm to obtain the second connection parameter.
15. An electronic device comprising communication circuitry, a memory, and a processor, the communication circuitry, the memory being respectively coupled to the processor, the memory having program instructions stored therein, the processor being configured to execute the program instructions to implement the resource processing method of any of claims 1-14.
16. The resource processing system is characterized by comprising a center node, and a service terminal and a data node which are respectively in communication connection with the center node;
wherein the central node is configured to perform the resource processing method of any of claims 1 to 7, the service terminal is configured to perform the resource processing method of any of claims 8 to 11, and the data node is configured to perform the resource processing method of any of claims 12 to 14.
17. A computer readable storage medium, characterized in that program instructions executable by a processor for implementing the resource processing method of any one of claims 1 to 14 are stored.
CN202311649872.6A 2023-11-29 2023-11-29 Resource processing method, related device, equipment, system and storage medium Pending CN117667400A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311649872.6A CN117667400A (en) 2023-11-29 2023-11-29 Resource processing method, related device, equipment, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311649872.6A CN117667400A (en) 2023-11-29 2023-11-29 Resource processing method, related device, equipment, system and storage medium

Publications (1)

Publication Number Publication Date
CN117667400A true CN117667400A (en) 2024-03-08

Family

ID=90067593

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311649872.6A Pending CN117667400A (en) 2023-11-29 2023-11-29 Resource processing method, related device, equipment, system and storage medium

Country Status (1)

Country Link
CN (1) CN117667400A (en)

Similar Documents

Publication Publication Date Title
US10795740B2 (en) Parameter delegation for encapsulated services
US11645144B2 (en) Methods and systems securing an application based on auto-learning and auto-mapping of application services and APIs
CN112491972A (en) Resource obtaining, distributing and downloading method, device, equipment and storage medium
CN109413043B (en) Method and device for realizing dynamic configuration of database, electronic equipment and storage medium
US11023311B2 (en) On-demand code execution in input path of data uploaded to storage service in multiple data portions
US20210096884A1 (en) On-demand indexing of data in input path of object storage service
CN109600441A (en) Alliance&#39;s chain information distribution control method and terminal device
CN102404326B (en) Method, system and device for validating safety of messages
US9443067B1 (en) System for the distribution and deployment of applications, with provisions for security and policy conformance
WO2015127603A1 (en) Interface management service entity, functional service entity and network element management method
EP3314429A1 (en) Resource provisioning in distributed computing environments
CN111241152B (en) Policy information mining method and device and cloud server
CN112035859A (en) Calling method and device of password service, storage medium and electronic device
US9449171B2 (en) Methods, systems, and computer readable mediums for providing supply chain validation
CN108833500B (en) Service calling method, service providing method, data transmission method and server
WO2022081334A1 (en) Systems and methods for autonomous program detection
CN117667400A (en) Resource processing method, related device, equipment, system and storage medium
CN113595962B (en) Safety control method and device and safety control equipment
CN114065183A (en) Authority control method and device, electronic equipment and storage medium
US20210200890A1 (en) Client-side encryption and processing of telemetry data
CN111404901A (en) Information verification method and device
CN114390044B (en) File uploading method, system, equipment and storage medium
US20230418805A1 (en) Tenantification of database management systems
CN111680003B (en) File center system and file management method based on distribution
US20240012921A1 (en) Dynamic resolution and enforcement of data compliance

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination