CN107193654B - Resource operation method and device of distributed system and distributed system - Google Patents

Resource operation method and device of distributed system and distributed system Download PDF

Info

Publication number
CN107193654B
CN107193654B CN201710334493.6A CN201710334493A CN107193654B CN 107193654 B CN107193654 B CN 107193654B CN 201710334493 A CN201710334493 A CN 201710334493A CN 107193654 B CN107193654 B CN 107193654B
Authority
CN
China
Prior art keywords
resource
target
instruction
identification code
resource operation
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.)
Active
Application number
CN201710334493.6A
Other languages
Chinese (zh)
Other versions
CN107193654A (en
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.)
Guangzhou Jieru Information Technology Co ltd
Original Assignee
Guangzhou Jieru Information Technology 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 Guangzhou Jieru Information Technology Co ltd filed Critical Guangzhou Jieru Information Technology Co ltd
Priority to CN201710334493.6A priority Critical patent/CN107193654B/en
Publication of CN107193654A publication Critical patent/CN107193654A/en
Application granted granted Critical
Publication of CN107193654B publication Critical patent/CN107193654B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a resource operation method and device of a distributed system and the distributed system. The resource operation method of the distributed system comprises the following steps: receiving and acquiring a resource operation instruction; wherein, the resource operation instruction comprises a target resource identification code; determining an instruction sending path according to the target resource identification code; according to the instruction sending path, sending the resource operation instruction to target equipment so that the target equipment performs corresponding operation on corresponding target resources according to the resource operation instruction and generates corresponding resource operation results; and receiving the resource operation result returned by the target equipment. By adopting the invention, the efficiency of resource operation in the distributed system can be improved.

Description

Resource operation method and device of distributed system and distributed system
Technical Field
The invention relates to the technical field of computers, in particular to a resource operation method and device of a distributed system and the distributed system.
Background
In the existing distributed system, a service exchange for resource allocation is often provided. When a host in the system needs to operate resources on other hosts, an operation instruction needs to be sent to the service switchboard first, so that the service switchboard analyzes the operation instruction, inquires resources in each host in the system, and sends the operation instruction to the host after searching the host where the resource to be operated is located. After receiving the operation instruction sent by the service switchboard, the host where the resource to be operated is located operates the resource to be operated according to the operation instruction, and feeds back a corresponding operation result to the service switchboard. After receiving the operation result, the service switchboard queries the host in the system, finds the host which sends the operation instruction, and forwards the operation result to the host. The whole resource operation flow is ended. Therefore, the existing method for performing resource operation in the distributed system has the disadvantages of complicated process and low efficiency.
Disclosure of Invention
The embodiment of the invention provides a resource operation method and device of a distributed system and the distributed system, which can improve the efficiency of resource operation in the distributed system.
The resource operation method of the distributed system provided by the embodiment of the invention specifically comprises the following steps:
receiving and acquiring a resource operation instruction; wherein, the resource operation instruction comprises a target resource identification code;
determining an instruction sending path according to the target resource identification code;
according to the instruction sending path, sending the resource operation instruction to target equipment so that the target equipment performs corresponding operation on corresponding target resources according to the resource operation instruction and generates corresponding resource operation results;
and receiving the resource operation result returned by the target equipment.
Further, the target resource is an application, a database, or a file stored in the target device.
Further, the determining an instruction sending path according to the target resource identification code specifically includes:
calculating to obtain instruction sending path information according to the target resource identification code and preconfigured route configuration information; wherein the instruction sending path information comprises at least one routing device identification code and a target equipment identification code;
and determining the instruction sending path according to the instruction sending path information.
Further, the target resource is a target database; the target database is stored in the target equipment;
the sending, according to the instruction sending path, the resource operation instruction to a target device, so that the target device performs a corresponding operation on a corresponding target resource according to the resource operation instruction and generates a corresponding resource operation result, specifically including:
and sending the resource operation instruction to the target equipment according to the instruction sending path, so that the target equipment finds the corresponding target database according to the target resource identification code in the resource operation instruction, converts the instruction format of the resource operation instruction into a target database instruction format which is suitable for the target database, and performs corresponding operation on the target database according to the resource operation instruction with the instruction format being the target database instruction format, thereby generating a corresponding resource operation result.
Further, the target device is an enterprise internal service device;
determining an instruction sending path according to the target resource identification code, specifically including:
acquiring an enterprise identification code corresponding to the target resource identification code according to the target resource identification code and a corresponding relation between a pre-configured resource and an enterprise;
calculating to obtain instruction sending path information according to the enterprise identification code and preconfigured route configuration information;
determining the instruction sending path according to the instruction sending path information;
the sending, according to the instruction sending path, the resource operation instruction to a target device, so that the target device performs a corresponding operation on a corresponding target resource according to the resource operation instruction and generates a corresponding resource operation result, specifically including:
and sending the resource operation instruction to the enterprise internal service equipment according to the instruction sending path so that the enterprise internal service equipment performs corresponding operation on the corresponding target resource according to the resource operation instruction and generates a corresponding resource operation result.
Correspondingly, an embodiment of the present invention further provides a resource operating apparatus for a distributed system, which specifically includes:
the resource operation instruction receiving module is used for receiving and obtaining a resource operation instruction; wherein, the resource operation instruction comprises a target resource identification code;
the instruction sending path obtaining module is used for determining an instruction sending path according to the target resource identification code;
the resource operation module is used for sending the resource operation instruction to target equipment according to the instruction sending path so that the target equipment performs corresponding operation on corresponding target resources according to the resource operation instruction and generates corresponding resource operation results; and the number of the first and second groups,
and the resource operation result obtaining module is used for receiving the resource operation result returned by the target equipment.
Further, the target resource is an application, a database, or a file stored in the target device.
Further, the instruction sending path obtaining module specifically includes:
the instruction sending path information obtaining unit is used for calculating and obtaining instruction sending path information according to the target resource identification code and preconfigured route configuration information; wherein the instruction sending path information comprises at least one routing device identification code and a target equipment identification code; and the number of the first and second groups,
and the instruction sending path determining unit is used for determining the instruction sending path according to the instruction sending path information.
Further, the target resource is a target database; the target database is stored in the target equipment;
the resource operation module specifically includes:
and the target database operation unit is used for sending the resource operation instruction to the target equipment according to the instruction sending path, so that the target equipment finds the corresponding target database according to the target resource identification code in the resource operation instruction, converts the instruction format of the resource operation instruction into a target database instruction format which is suitable for the target database, and performs corresponding operation on the target database according to the resource operation instruction with the instruction format being the target database instruction format, so as to generate a corresponding resource operation result.
Correspondingly, the embodiment of the invention also provides a distributed system, which specifically comprises at least one execution device and at least one target device;
each executing device is a resource operating device of the distributed system;
each target device is used for storing at least one target resource and performing corresponding operation on the corresponding target resource according to the resource operation instruction sent by the execution device.
The embodiment of the invention has the following beneficial effects:
according to the resource operation method and device of the distributed system and the distributed system, the corresponding instruction sending path is obtained according to the identification code of the target resource to be operated, and the resource operation instruction is sent to the corresponding target equipment along the instruction sending path, so that the target equipment performs resource operation according to the resource operation instruction, resource allocation and multiple equipment query do not need to be performed through a system service switchboard, the resource operation process in the distributed system can be simplified, and the resource operation efficiency in the distributed system is improved.
Drawings
FIG. 1 is a flow diagram of a preferred embodiment of a resource operating method of a distributed system provided by the present invention;
FIG. 2 is a schematic structural diagram of a preferred embodiment of a resource operating apparatus of a distributed system provided in the present invention;
fig. 3 is a schematic structural diagram of a preferred embodiment of the distributed system provided by the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The method and the device have the advantages that the corresponding resource identification codes are configured for the resources in all the devices in the distributed system in advance, the corresponding operation paths are obtained through calculation according to the target resource identification codes of the resources to be operated, and the resource operation instructions are sent to the devices where the resources to be operated are located according to the operation paths so as to control the devices to operate the resources to be operated, so that the process of operating the resources in the distributed system can be simplified, and the efficiency of the process is improved.
As shown in fig. 1, a schematic flowchart of a resource operation method of a distributed system according to a preferred embodiment of the present invention includes steps S11 to S14, which are as follows:
s11: receiving and acquiring a resource operation instruction; wherein, the resource operation instruction comprises a target resource identification code;
s12: determining an instruction sending path according to the target resource identification code;
s13: according to the instruction sending path, sending the resource operation instruction to target equipment so that the target equipment performs corresponding operation on corresponding target resources according to the resource operation instruction and generates corresponding resource operation results;
s14: and receiving the resource operation result returned by the target equipment.
It should be noted that the embodiment of the present invention is executed by one execution device in a distributed system. The distributed system provided by the embodiment of the invention can comprise at least one execution device, at least one target device and a plurality of routing devices.
The execution equipment comprises a human-computer interaction interface, a data operation interface and a data processing device. The human-computer interaction interface is used for providing interaction between a user and the equipment; the data operation interface is used for processing the interactive information generated by the human-computer interactive interface and the information sent to the local by other equipment; the data processing device is used for processing data such as calculation and combination. The target device comprises a data operation interface, a local data operation interface and a plurality of operable resources. The data operation interface is used for processing information sent to the local by other equipment; the local data operation interface is used for operating and correspondingly processing local resources; the resources in the target device may be databases, files, or applications.
When a user operates a certain resource through the human-computer interaction interface, the human-computer interaction interface generates a corresponding resource operation instruction and sends the resource operation instruction to the data operation interface. And after analyzing the resource operation instruction, the data operation interface sends the resource operation instruction to a data processing device. The data processing device calculates and obtains a path between the local and the target equipment where the target resource is located, namely an instruction sending path, according to the identification code of the target resource to be operated in the resource operation instruction and the routing configuration information pre-configured in the local, and returns the instruction sending path to the data operation interface. After receiving the instruction sending path, the data operation interface sends the previously received resource operation instruction to the target device where the target resource is located along the instruction sending path.
After receiving a resource operation instruction sent by an execution device, a data operation interface in the target device finds a target resource corresponding to the target resource identification code stored locally according to the target resource identification code in the resource operation instruction, and calls the local data operation interface to operate the target resource and generate a corresponding resource operation result. After the operation on the target resource is completed, the data operation interface in the target device feeds back the generated resource operation result to the execution device.
And after receiving the resource operation result fed back by the target equipment, the data operation interface of the execution equipment performs corresponding processing such as combination, entity conversion and the like on the resource operation result, and displays the correspondingly processed resource operation result to a human-computer interaction interface so as to respond to the operation of the target resource by a user.
It should be further explained that the operation on the resource includes, but is not limited to, modifying, deleting, viewing, etc. the resource. The executing device and the target device may be the same device, that is, when the target resource is stored in the local resource storage device of the executing device, after receiving the instruction sending path fed back by the data processing device, the data operation interface of the executing device directly finds the corresponding target resource in the local resource storage device according to the resource operation instruction, and calls the local data operation interface to operate the target resource. The executing device and the target device may be devices in the same cluster, or may be devices in different clusters. Corresponding instruction log files can be configured in the execution device and the target device and used for recording respective instruction execution histories. In some embodiments, the simultaneous operation of multiple resources may also be achieved by employing multi-threading techniques.
According to the embodiment of the invention, the corresponding instruction sending path is obtained according to the identification code of the target resource to be operated, and the resource operation instruction is sent to the corresponding target equipment along the instruction sending path, so that the target equipment performs resource operation according to the resource operation instruction, and resource allocation and repeated equipment query do not need to be performed through a system service switchboard, therefore, the process of performing resource operation in a distributed system can be simplified, and the efficiency of performing resource operation in the distributed system is improved.
Further, the target resource is an application, a database, or a file stored in the target device.
The resource stored in the target device may be an application, a database, or a file. The target device further comprises an available resource management device for managing the availability of each resource in the target device. Specifically, after a data operation interface in the target device receives a resource operation instruction sent by the execution device and finds a corresponding target resource according to a target resource identification code in the resource operation instruction, the available resource management device is queried to see whether the target resource is available, and when the target resource is found to be available through querying, the local data operation interface is called to operate the target resource.
According to the embodiment of the invention, the database, the file, the application and the like in the target equipment can be operated and called by configuring the corresponding resource identification code for each resource, so that the diversity of operable resources is greatly improved.
More preferably, the determining an instruction sending path according to the target resource identification code specifically includes:
calculating to obtain instruction sending path information according to the target resource identification code and preconfigured route configuration information; wherein the instruction sending path information comprises at least one routing device identification code and a target equipment identification code;
and determining the instruction sending path according to the instruction sending path information.
It should be noted that, after receiving the resource operation instruction sent by the data operation interface, the data processing device of the execution device calculates, according to the target resource identifier code in the resource operation instruction, the routing configuration information and the routing algorithm pre-configured in the local, the identifier code of the target device where the target resource is located, and the identifier codes of the routing devices of all the routing devices that the resource operation instruction needs to pass through to send the target device, thereby determining the instruction sending path. After the instruction sending path is obtained, the data operation interface of the execution device sends the resource operation instruction to the next-hop routing device according to the instruction sending path, so that the next-hop routing device sends the resource operation instruction to the next-hop routing device according to the instruction sending path, and so on until the resource operation instruction is sent to the target device.
It is understood that the routing device in this embodiment may be a router, a switch, or the like.
In another more preferred embodiment, on the basis of the above embodiment, the target resource is a target database; the target database is stored in the target equipment;
the sending, according to the instruction sending path, the resource operation instruction to a target device, so that the target device performs a corresponding operation on a corresponding target resource according to the resource operation instruction and generates a corresponding resource operation result, specifically including:
and sending the resource operation instruction to the target equipment according to the instruction sending path, so that the target equipment finds the corresponding target database according to the target resource identification code in the resource operation instruction, converts the instruction format of the resource operation instruction into a target database instruction format which is suitable for the target database, and performs corresponding operation on the target database according to the resource operation instruction with the instruction format being the target database instruction format, thereby generating a corresponding resource operation result.
It should be noted that the resources stored in the target device may be several different types of databases. In order to make the operation on the database not limited by the language format of the database, the local data operation interface provided by the embodiment of the present invention further includes a unified general database operation interface. After receiving the resource operation instruction sent by the execution device and finding the corresponding target resource (namely the target database) according to the resource operation instruction, the data operation interface in the target device calls the local data operation interface to operate the target resource. The database operation interface in the data operation interface converts the format of the resource operation instruction, so that the format of the resource operation instruction is converted into a target database instruction format which can be suitable for a target database, and the resource operation instruction is executed in the target database, so that the operation on the target database is realized.
Correspondingly, a database log can be configured in the target device for recording related operations of the database. In some specific embodiments, the database log may be an SQL (Structured Query Language) log, that is, the operation manner of the database in the device is finally converted into an SQL manner, and therefore, the database log is used to record all SQL operations on the database in the device.
According to the embodiment of the invention, the unified and universal database operation interface is configured in the target equipment, so that the format of the resource operation instruction is not limited by the type of the target database in the target equipment, the resource universality is improved, the realization difficulty in operating different types of resources is reduced, and the user experience is greatly improved.
In a further preferred embodiment, on the basis of the above embodiment, the target device is an enterprise internal service device;
determining an instruction sending path according to the target resource identification code, specifically including:
acquiring an enterprise identification code corresponding to the target resource identification code according to the target resource identification code and a corresponding relation between a pre-configured resource and an enterprise;
calculating to obtain instruction sending path information according to the enterprise identification code and preconfigured route configuration information;
determining the instruction sending path according to the instruction sending path information;
the sending, according to the instruction sending path, the resource operation instruction to a target device, so that the target device performs a corresponding operation on a corresponding target resource according to the resource operation instruction and generates a corresponding resource operation result, specifically including:
and sending the resource operation instruction to the enterprise internal service equipment according to the instruction sending path so that the enterprise internal service equipment performs corresponding operation on the corresponding target resource according to the resource operation instruction and generates a corresponding resource operation result.
It should be noted that the distributed system provided by the embodiment of the present invention may be applied to an enterprise application system, so as to implement resource sharing of applications, data, and the like between different enterprises. Specifically, the service devices in the enterprise all use the identification code of the enterprise as an identification, after receiving the resource operation instruction, the data processing device of the execution device queries the correspondence between the resource pre-configured in the local and the enterprise, obtains the enterprise identification code corresponding to the target resource identification code in the resource operation instruction, and calculates and obtains the corresponding instruction sending path according to the enterprise identification code and the routing configuration information, routing algorithm and the like pre-configured in the local. After the data operation interface of the execution device obtains the instruction sending path, the resource operation instruction is sent to the corresponding internal service device of the enterprise along the instruction sending path, so that the internal service device of the enterprise inquires the internal resource of the enterprise according to the resource operation instruction, obtains the corresponding target resource, and performs corresponding operation on the target resource.
The embodiment of the invention determines the sending path of the resource operation instruction by introducing the enterprise identification code, thereby realizing the resource sharing among enterprises, avoiding the repetition of resource storage and saving a large amount of resource storage space.
According to the resource operation method of the distributed system, the corresponding instruction sending path is obtained according to the identification code of the target resource to be operated, and the resource operation instruction is sent to the corresponding target equipment along the instruction sending path, so that the target equipment performs resource operation according to the resource operation instruction, resource allocation and multiple equipment queries do not need to be performed through a system service switchboard, and therefore the process of performing resource operation in the distributed system can be simplified, and the efficiency of performing resource operation in the distributed system is improved. In addition, the corresponding resource identification code is configured for each resource, so that a database, a file, an application and the like in the target equipment can be operated and called, and the diversity of operable resources is greatly improved. In some specific embodiments, a unified and general database operation interface may be configured in the target device, so that the format of the resource operation instruction is not limited by the type of the target database in the target device, thereby improving resource universality, reducing implementation difficulty in operating different types of resources, and greatly improving user experience. In other specific embodiments, the sending path of the resource operation instruction can be determined by introducing the enterprise identification code, so that resource sharing among enterprises is realized, resource storage repetition is avoided, and a large amount of resource storage space is saved.
Correspondingly, the invention also provides a resource operating device of the distributed system, which can realize all the processes of the resource operating method of the distributed system.
As shown in fig. 2, a schematic structural diagram of a resource operating apparatus of a distributed system according to a preferred embodiment of the present invention is specifically as follows:
a resource operation instruction receiving module 21, configured to receive a resource operation instruction; wherein, the resource operation instruction comprises a target resource identification code;
the instruction sending path obtaining module 22 is configured to determine an instruction sending path according to the target resource identification code;
the resource operation module 23 is configured to send the resource operation instruction to a target device according to the instruction sending path, so that the target device performs corresponding operation on a corresponding target resource according to the resource operation instruction and generates a corresponding resource operation result; and the number of the first and second groups,
a resource operation result obtaining module 24, configured to receive the resource operation result returned by the target device.
Further, the target resource is an application, a database, or a file stored in the target device.
More preferably, the instruction sending path obtaining module specifically includes:
the first instruction sending path information obtaining unit is used for calculating and obtaining instruction sending path information according to the target resource identification code and preconfigured route configuration information; wherein the instruction sending path information comprises at least one routing device identification code and a target equipment identification code; and the number of the first and second groups,
and the first instruction sending path determining unit is used for determining the instruction sending path according to the instruction sending path information.
In another more preferred embodiment, on the basis of the above embodiment, the target resource is a target database; the target database is stored in the target equipment;
the resource operation module specifically includes:
and the target database operation unit is used for sending the resource operation instruction to the target equipment according to the instruction sending path, so that the target equipment finds the corresponding target database according to the target resource identification code in the resource operation instruction, converts the instruction format of the resource operation instruction into a target database instruction format which is suitable for the target database, and performs corresponding operation on the target database according to the resource operation instruction with the instruction format being the target database instruction format, so as to generate a corresponding resource operation result.
In a further preferred embodiment, on the basis of the above embodiment, the target device is an enterprise internal service device;
the instruction sending path obtaining module specifically includes:
the enterprise identification code obtaining unit is used for obtaining an enterprise identification code corresponding to the target resource identification code according to the target resource identification code and the corresponding relation between the pre-configured resources and the enterprise;
the second instruction sending path information obtaining unit is used for calculating and obtaining instruction sending path information according to the enterprise identification code and preconfigured route configuration information;
a second instruction transmission path determining unit, configured to determine the instruction transmission path according to the instruction transmission path information;
the resource operation module specifically includes:
and the enterprise resource operation unit is used for sending the resource operation instruction to the enterprise internal service equipment according to the instruction sending path so that the enterprise internal service equipment performs corresponding operation on the corresponding target resource according to the resource operation instruction and generates a corresponding resource operation result.
Fig. 3 is a schematic structural diagram of a preferred embodiment of a distributed system provided by the present invention, which includes at least one execution device 31 and at least one target device 32;
each of the execution devices 31 is a resource operating apparatus of the distributed system as described in any one of the above;
each target device 32 is configured to store at least one target resource, and perform corresponding operation on the target database according to the resource operation instruction sent by the execution device 31.
It should be noted that fig. 3 only illustrates that one execution device 31 is connected to multiple target devices 32, in a specific implementation, one execution device 31 may be connected to only one target device 32, and one target device 32 may also be connected to multiple execution devices 31 at the same time, and the number of the execution devices 31 may be configured according to an actual application.
According to the resource operating device of the distributed system and the distributed system provided by the embodiment of the invention, the corresponding instruction sending path is obtained according to the identification code of the target resource to be operated, and the resource operating instruction is sent to the corresponding target equipment along the instruction sending path, so that the target equipment performs resource operation according to the resource operating instruction, and resource allocation and multiple equipment query do not need to be performed through a system service switchboard, therefore, the process of performing resource operation in the distributed system can be simplified, and the efficiency of performing resource operation in the distributed system is improved. In addition, the corresponding resource identification code is configured for each resource, so that a database, a file, an application and the like in the target equipment can be operated and called, and the diversity of operable resources is greatly improved. In some specific embodiments, a unified and general database operation interface may be configured in the target device, so that the format of the resource operation instruction is not limited by the type of the target database in the target device, thereby improving resource universality, reducing implementation difficulty in operating different types of resources, and greatly improving user experience. In other specific embodiments, the sending path of the resource operation instruction can be determined by introducing the enterprise identification code, so that resource sharing among enterprises is realized, resource storage repetition is avoided, and a large amount of resource storage space is saved.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (6)

1. A method for resource operation in a distributed system, comprising:
allocating corresponding resource identification codes for resources in all devices in the distributed system in advance, and receiving and acquiring a resource operation instruction; wherein, the resource operation instruction comprises a target resource identification code;
determining an instruction sending path according to the target resource identification code; specifically, instruction sending path information is calculated and obtained according to the target resource identification code and preconfigured route configuration information; wherein the instruction sending path information comprises at least one routing device identification code and a target equipment identification code; determining the instruction sending path according to the instruction sending path information;
according to the instruction sending path, sending the resource operation instruction to target equipment so that the target equipment performs corresponding operation on corresponding target resources according to the resource operation instruction and generates corresponding resource operation results; the target resource is a target database; the target database is stored in the target device, specifically, the resource operation instruction is sent to the target device according to the instruction sending path, so that the target device finds the corresponding target database according to the target resource identification code in the resource operation instruction, converts the instruction format of the resource operation instruction into a target database instruction format adapted to the target database, and performs corresponding operation on the target database according to the resource operation instruction with the instruction format being the target database instruction format, so as to generate a corresponding resource operation result;
the target device comprises a database operation interface for converting the format of the resource operation instruction, so that the format of the resource operation instruction is converted into a target database instruction format suitable for a target database; the target device is also configured with a database log for recording SQL operations on the database in the device, and available resource management means for managing the availability of resources in the target device; specifically, after a data operation interface in the target device receives a resource operation instruction sent by the execution device and finds a corresponding target resource according to a target resource identification code in the resource operation instruction, the available resource management device is queried to check whether the target resource is available, and when the target resource is found to be available through querying, a local data operation interface is called to operate the target resource, wherein the operation on the resource includes but is not limited to modification, deletion and checking of the resource, and simultaneous operation on a plurality of resources is realized through a multithreading technology;
receiving the resource operation result returned by the target equipment; specifically, after receiving the resource operation result fed back by the target device, the data operation interface of the execution device performs corresponding merging and entity conversion processing on the resource operation result, and displays the resource operation result subjected to corresponding processing to the human-computer interaction interface so as to respond to the operation of the user on the target resource.
2. The resource operating method of a distributed system according to claim 1, wherein the target resource is also an application or a file stored in the target device.
3. The method of resource operation for a distributed system according to claim 1, wherein the target device is an enterprise internal service device;
determining an instruction sending path according to the target resource identification code, specifically including:
acquiring an enterprise identification code corresponding to the target resource identification code according to the target resource identification code and a corresponding relation between a pre-configured resource and an enterprise;
calculating to obtain instruction sending path information according to the enterprise identification code and preconfigured route configuration information;
determining the instruction sending path according to the instruction sending path information;
the sending, according to the instruction sending path, the resource operation instruction to a target device, so that the target device performs a corresponding operation on a corresponding target resource according to the resource operation instruction and generates a corresponding resource operation result, specifically including:
and sending the resource operation instruction to the enterprise internal service equipment according to the instruction sending path so that the enterprise internal service equipment performs corresponding operation on the corresponding target resource according to the resource operation instruction and generates a corresponding resource operation result.
4. A resource operating apparatus of a distributed system, comprising:
the resource operation instruction receiving module is used for allocating corresponding resource identification codes for resources in all devices in the distributed system in advance and receiving and obtaining a resource operation instruction; wherein, the resource operation instruction comprises a target resource identification code;
the instruction sending path obtaining module is used for determining an instruction sending path according to the target resource identification code; the method specifically comprises the following steps: the instruction sending path information obtaining unit is used for calculating and obtaining instruction sending path information according to the target resource identification code and preconfigured route configuration information; wherein the instruction sending path information comprises at least one routing device identification code and a target equipment identification code; the instruction sending path determining unit is used for determining the instruction sending path according to the instruction sending path information;
the resource operation module is used for sending the resource operation instruction to target equipment according to the instruction sending path so that the target equipment performs corresponding operation on corresponding target resources according to the resource operation instruction and generates corresponding resource operation results; the target device comprises a database operation interface for converting the format of the resource operation instruction, so that the format of the resource operation instruction is converted into a target database instruction format suitable for a target database; the target resource is a target database; the target database is stored in the target equipment; the resource operation module specifically includes a target database operation unit, configured to send the resource operation instruction to the target device according to the instruction sending path, so that the target device finds the corresponding target database according to the target resource identification code in the resource operation instruction, converts the instruction format of the resource operation instruction into a target database instruction format adapted to the target database, and performs corresponding operation on the target database according to the resource operation instruction whose instruction format is the target database instruction format, so as to generate a corresponding resource operation result;
the target device is also provided with a database log used for recording SQL operations of the database in the device and an available resource management device used for managing the availability of the resources in the target device; specifically, after a data operation interface in the target device receives a resource operation instruction sent by the execution device and finds a corresponding target resource according to a target resource identification code in the resource operation instruction, the data operation interface queries the available resource management device to check whether the target resource is available, and when the query finds that the target resource is available, the data operation interface is called to operate the target resource; the operation on the resource comprises but is not limited to modifying, deleting and viewing the resource, and the simultaneous operation on a plurality of resources is realized through a multithreading technology;
a resource operation result obtaining module, configured to receive the resource operation result returned by the target device; specifically, after receiving the resource operation result fed back by the target device, the data operation interface of the execution device performs corresponding merging and entity conversion processing on the resource operation result, and displays the resource operation result subjected to corresponding processing to the human-computer interaction interface so as to respond to the operation of the user on the target resource.
5. The resource operating apparatus of a distributed system according to claim 4, wherein the target resource is also an application or a file stored in the target device.
6. A distributed system comprising at least one executing device and at least one target device;
each of the execution devices is a resource operating apparatus of the distributed system according to any one of claims 4 to 5;
each target device is used for storing at least one target resource and performing corresponding operation on the corresponding target resource according to the resource operation instruction sent by the execution device.
CN201710334493.6A 2017-05-12 2017-05-12 Resource operation method and device of distributed system and distributed system Active CN107193654B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710334493.6A CN107193654B (en) 2017-05-12 2017-05-12 Resource operation method and device of distributed system and distributed system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710334493.6A CN107193654B (en) 2017-05-12 2017-05-12 Resource operation method and device of distributed system and distributed system

Publications (2)

Publication Number Publication Date
CN107193654A CN107193654A (en) 2017-09-22
CN107193654B true CN107193654B (en) 2020-11-10

Family

ID=59874089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710334493.6A Active CN107193654B (en) 2017-05-12 2017-05-12 Resource operation method and device of distributed system and distributed system

Country Status (1)

Country Link
CN (1) CN107193654B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110941480A (en) * 2019-07-11 2020-03-31 深圳梧童科技有限公司 Terminal equipment interaction system and method, readable storage medium and terminal equipment
CN112115303B (en) * 2020-09-02 2023-10-03 北京达佳互联信息技术有限公司 Data processing method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101854378B (en) * 2010-02-26 2013-02-13 深圳市龙视传媒有限公司 Data operating method and data operating equipment
US8538926B2 (en) * 2011-03-08 2013-09-17 Rackspace Us, Inc. Massively scalable object storage system for storing object replicas
CN102567505B (en) * 2011-12-26 2015-05-20 中兴通讯股份有限公司 Distributed database and data manipulation method
CN106572054B (en) * 2015-10-09 2019-09-17 阿里巴巴集团控股有限公司 Distributed lock service implementing method and device in distributed system
CN105808776A (en) * 2016-03-29 2016-07-27 中国建设银行股份有限公司 Data management system and method of distributed database

Also Published As

Publication number Publication date
CN107193654A (en) 2017-09-22

Similar Documents

Publication Publication Date Title
CN111382174B (en) Multi-party data joint query method, device, server and storage medium
CN111897638B (en) Distributed task scheduling method and system
CN107515878B (en) Data index management method and device
CN109597853B (en) Business scene element serial number generation method, device, medium and computer equipment
US8843632B2 (en) Allocation of resources between web services in a composite service
CN105450618A (en) Operation method and operation system of big data process through API (Application Programming Interface) server
CN103593419A (en) Method, device, server and system for inquiring data
CN106951179B (en) Data migration method and device
US11431827B2 (en) Data center management system
CN110795029A (en) Cloud hard disk management method, device, server and medium
CN111797091A (en) Method and device for querying data in database, electronic equipment and storage medium
CN110096521A (en) Log information processing method and device
CN107193654B (en) Resource operation method and device of distributed system and distributed system
CN105094981A (en) Method and device for processing data
CN111552934A (en) Database access method and device
CN107888700B (en) Shared cloud rendering system and processing method thereof
CN107342929B (en) Method, device and system for sending new message notification
CN103581273A (en) Service executing method, device and system for distributed system
US10025859B2 (en) Method and system for second-degree friend query
CN110619008A (en) Database query method and device, electronic equipment and storage medium
CN110096381A (en) Implementation method, device, equipment and the medium of remote procedure call
CN111555894B (en) Data processing method, device, equipment and storage medium
CN113111666A (en) System and method for realizing multi-language translation of application program
CN117032962A (en) Distribution method and device of computing power resources, storage medium and electronic equipment
CN110750362A (en) Method and apparatus for analyzing biological information, and storage medium

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
GR01 Patent grant
GR01 Patent grant