CN116501414B - Resource control method, device, medium and computing equipment based on cloud platform - Google Patents
Resource control method, device, medium and computing equipment based on cloud platform Download PDFInfo
- Publication number
- CN116501414B CN116501414B CN202310392738.6A CN202310392738A CN116501414B CN 116501414 B CN116501414 B CN 116501414B CN 202310392738 A CN202310392738 A CN 202310392738A CN 116501414 B CN116501414 B CN 116501414B
- Authority
- CN
- China
- Prior art keywords
- target
- cloud platform
- target method
- resource
- preset template
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 357
- 238000013524 data verification Methods 0.000 claims description 36
- 230000001960 triggered effect Effects 0.000 claims description 9
- 230000005540 biological transmission Effects 0.000 claims description 8
- 238000012546 transfer Methods 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 5
- 230000004044 response Effects 0.000 description 8
- 230000003287 optical effect Effects 0.000 description 6
- 238000012545 processing Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000013507 mapping Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4488—Object-oriented
- G06F9/449—Object-oriented method invocation or resolution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4482—Procedural
- G06F9/4484—Executing subprograms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Auxiliary Devices For And Details Of Packaging Control (AREA)
- Programmable Controllers (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a resource control method, a device, a medium and a computing device based on a cloud platform, which comprise the following steps: responding to a starting instruction of a target item, and carrying out package scanning on the target item to obtain a target method corresponding to the target item; the target method is a method for executing resource operation on the cloud platform; registering the target method in a registration machine according to the custom annotation on the target method; responding to a calling instruction of the target method, calling a preset template method, and transmitting an annotation identifier corresponding to the target method to the preset template method so that the preset template method obtains the target method from a container of the register based on the annotation identifier; and executing the target method through reflection so as to control the resources of the cloud platform. Therefore, the method and the device can reduce the complexity of cloud platform resource control.
Description
Technical Field
The invention relates to the technical field of cloud computing, in particular to a resource control method, device, medium and computing equipment based on a cloud platform.
Background
At present, in the process of performing resource operation on a cloud platform, the resource operation of a new cloud platform is often required.
In practice, the mode of newly adding the resource operation of the cloud platform is found to need to modify the calling end code and the original online resource operation code of the cloud platform when the new cloud platform resource operation is added. Therefore, the caller needs to pay attention to the resource operation logic of the cloud platform, and the complexity of the resource control of the cloud platform is increased.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a resource control method, a device, a medium and computing equipment based on a cloud platform, which can reduce the complexity of cloud platform resource control.
According to an aspect of the embodiment of the present invention, there is provided a resource control method based on a cloud platform, applied to the cloud platform, including:
responding to a starting instruction of a target item, and carrying out package scanning on the target item to obtain a target method corresponding to the target item; the target method is a method for executing resource operation on the cloud platform;
registering the target method in a registration machine according to the custom annotation on the target method;
responding to a calling instruction of the target method, calling a preset template method, and transmitting an annotation identifier corresponding to the target method to the preset template method so that the preset template method obtains the target method from a container of the register based on the annotation identifier;
and executing the target method through reflection so as to control the resources of the cloud platform.
As an alternative embodiment, the method further comprises:
and when the execution of the target method is completed, acquiring base class data corresponding to the target method.
As an alternative embodiment, the method further comprises:
and carrying out parameter transfer based on the base class data or the sub-class data corresponding to the base class data.
As an alternative embodiment, the method further comprises:
responding to a resource calling instruction triggered by the touch operation of a detected user, and determining method information indicated to be called by the resource calling instruction;
and if the method information is matched with the target method, determining that a calling instruction of the target method is detected.
As an optional implementation manner, before invoking the preset template method, the method further includes:
performing data verification based on the method information to obtain a data verification result;
and if the data verification result indicates that the data verification is passed, performing resource operation.
According to another aspect of the embodiment of the present invention, there is also provided a resource control device based on a cloud platform, which is applied to the cloud platform, including:
the method determining unit is used for responding to a starting instruction of a target item, carrying out package scanning on the target item and obtaining a target method corresponding to the target item; the target method is a method for executing resource operation on the cloud platform;
a method registration unit, configured to register the target method in a registration machine according to the custom annotation on the target method;
a method calling unit, configured to respond to a calling instruction for the target method, call a preset template method, and transmit an annotation identifier corresponding to the target method to the preset template method, so that the preset template method obtains the target method from a container of the register based on the annotation identifier;
and the method execution unit is used for executing the target method through reflection so as to control the resources of the cloud platform.
As an alternative embodiment, the apparatus further comprises:
and the data acquisition unit is used for acquiring the base class data corresponding to the target method when the execution of the target method is completed.
As an alternative embodiment, the apparatus further comprises:
and the parameter transmission unit is used for carrying out parameter transmission based on the base class data or the sub-class data corresponding to the base class data.
According to yet another aspect of an embodiment of the present invention, there is also provided a computing device including: at least one processor, memory, and input output unit; the storage is used for storing a computer program, and the processor is used for calling the computer program stored in the storage to execute the resource control method based on the cloud platform.
According to yet another aspect of an embodiment of the present invention, there is also provided a computer-readable storage medium including instructions that, when executed on a computer, cause the computer to perform the above-described cloud platform-based resource control method.
In the embodiment of the invention, responding to a starting instruction of a target item, and carrying out package scanning on the target item to obtain a target method corresponding to the target item; the target method is a method for executing resource operation on the cloud platform; registering the target method in a registration machine according to the custom annotation on the target method; responding to a calling instruction of the target method, calling a preset template method, and transmitting an annotation identifier corresponding to the target method to the preset template method so that the preset template method obtains the target method from a container of the register based on the annotation identifier; executing the target method through reflection so as to control resources of the cloud platform; therefore, the method can be used for realizing the calling instruction of the response method by registering the method to the registration machine and calling the method from the registration machine and directly executing the method by reflecting the executing method, so that the resource control of the cloud platform is carried out without paying attention to historical code logic by a caller, and the complexity of the resource control of the cloud platform is reduced.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a flow diagram of an alternative cloud platform-based resource control method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an alternative cloud platform-based resource control device according to an embodiment of the present invention;
FIG. 3 schematically illustrates a schematic structural diagram of a medium according to an embodiment of the present invention;
FIG. 4 schematically illustrates a structural diagram of a computing device in accordance with embodiments of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 1, fig. 1 is a flow chart of a resource control method based on a cloud platform according to an embodiment of the present invention. It should be noted that embodiments of the present invention may be applied to any scenario where applicable.
The flow of the cloud platform-based resource control method according to an embodiment of the present invention shown in fig. 1 includes:
step S101, responding to a starting instruction of a target item, and carrying out package scanning on the target item to obtain a target method corresponding to the target item; the target method is a method for executing resource operation on the cloud platform;
step S102, registering the target method in a register according to the user-defined annotation on the target method;
step S103, a preset template method is called in response to a call instruction of the target method, and annotation identifiers corresponding to the target method are transmitted to the preset template method, so that the preset template method obtains the target method from a container of the register based on the annotation identifiers;
step S104, executing the target method through reflection so as to control the resources of the cloud platform.
In this embodiment, the execution body may be an electronic device such as a terminal device or a server that performs a resource operation on the cloud platform.
When the target item is started, the target item can be scanned in a package, namely, the target method is scanned in the package corresponding to the target item. The target method is a method requiring resource operation to be executed on the cloud platform. After the target method is scanned, the execution subject can register the target method in the registration machine according to the custom annotation on the method. Specifically, the execution body can register the method of the resource operation required to be executed on the cloud platform on the registration machine by using the principle of the registration machine. Thereafter, if the methods are required to be used, the method to be used can be acquired from the registrar.
Specifically, the execution body may scan the method under the related package by means of package scanning, and perform method registration according to the invoker mapping and the enclosed, and register the method into the container resource container map.
After registering the target method in the registration machine, if the target method needs to be called, the execution main body can call a preset template method in response to a call instruction for the target method, and transfer annotation identifications corresponding to the target method to the preset template method, acquire the target method from a container of the registration machine through the annotation identifications and the method representations, and then use reflection to execute the target method, so that resource control of the cloud platform is realized. The reflection is used for executing the method, the specific implementation of the method is not concerned, and only the method is concerned, so that the specific implementation is developed by a developer.
And the preset template method can be generated in a template mode, and the preset template method is obtained by defining the same operation sequence.
Specifically, the execution body may call a preset template method, and transfer an annotation identifier corresponding to the target method to the preset template method, and obtain, through the annotation identifier and the method representation, a corresponding method to be executed from the registered container resourcecontaineermap.
As an alternative embodiment, the method further comprises:
and when the execution of the target method is completed, acquiring base class data corresponding to the target method.
In this embodiment, when the execution of the target method is completed, the execution subject may acquire base class data corresponding to the target method. The application can adopt a generic structure, wherein the generic structure refers to a definition base class, and parameter transmission is performed by using subclasses or base classes. The base class data may be returned when the target method execution is complete.
As an alternative embodiment, the method further comprises:
and carrying out parameter transfer based on the base class data or the sub-class data corresponding to the base class data.
In this embodiment, the execution body may implement parameter transfer by using the base class data or the sub-class data corresponding to the base class data, thereby implementing generic structure logic.
As an alternative embodiment, the method further comprises:
responding to a resource calling instruction triggered by the touch operation of a detected user, and determining method information indicated to be called by the resource calling instruction;
and if the method information is matched with the target method, determining that a calling instruction of the target method is detected.
In this embodiment, if a resource call instruction triggered by a touch operation of a user is detected, method information that is carried by the resource call instruction and indicates that the call needs to be performed may be determined. Wherein the method information herein may be represented as parameters. The user is usually a caller, and when the caller needs to call the resource operation in the cloud platform, the resource call instruction can be triggered, and parameters are carried. Then, the executing body can analyze the parameters in the method information to determine whether the parameters are matched with the target method, if so, the caller is determined to call the target method, and at the moment, the caller is determined to detect the call instruction to the target method.
Therefore, through the implementation mode, the method is friendly to the caller, and the caller does not need to carry out code logic modification when the cloud platform is added, and only needs to trigger the resource calling instruction carrying the parameters. And the caller does not need to pay attention to the resource operation logic of a specific cloud platform, and only needs to pay attention to the current code logic when in new addition.
As an optional implementation manner, before invoking the preset template method, the method further includes:
performing data verification based on the method information to obtain a data verification result;
and if the data verification result indicates that the data verification is passed, performing resource operation.
In this embodiment, after detecting the resource calling instruction and before calling the preset template method, the execution body may perform data verification on the parameter first to obtain a data verification result. Wherein the data verification result includes that the data verification is passed or that the data verification is not passed. And if the data verification result indicates that the data verification is passed, performing resource operation. The resource operation is that the preset template method is called, and the annotation identification corresponding to the target method is transmitted to the preset template method, so that the preset template method obtains the target method from a container of the register based on the annotation identification.
In the embodiment of the invention, responding to a starting instruction of a target item, and carrying out package scanning on the target item to obtain a target method corresponding to the target item; the target method is a method for executing resource operation on the cloud platform; registering the target method in a registration machine according to the custom annotation on the target method; responding to a calling instruction of the target method, calling a preset template method, and transmitting an annotation identifier corresponding to the target method to the preset template method so that the preset template method obtains the target method from a container of the register based on the annotation identifier; executing the target method through reflection so as to control resources of the cloud platform; therefore, the method can be used for realizing the calling instruction of the response method by registering the method to the registration machine and calling the method from the registration machine and directly executing the method by reflecting the executing method, so that the resource control of the cloud platform is carried out without paying attention to historical code logic by a caller, and the complexity of the resource control of the cloud platform is reduced.
Having described the method of the exemplary embodiment of the present invention, a resource control device based on a cloud platform according to the exemplary embodiment of the present invention, which is applied to a cloud platform, includes at least a method determining unit 201, a method registering unit 202, a method calling unit 203, and a method executing unit 204, is described next with reference to fig. 2.
A method determining unit 201, configured to respond to a start instruction for a target item, and perform package scanning on the target item to obtain a target method corresponding to the target item; the target method is a method for executing resource operation on the cloud platform;
a method registration unit 202, configured to register the target method in a registration machine according to the custom annotation on the target method;
a method calling unit 203, configured to respond to a call instruction for the target method, call a preset template method, and transmit an annotation identifier corresponding to the target method to the preset template method, so that the preset template method obtains the target method from a container of the registrar based on the annotation identifier;
and the method executing unit 204 is configured to execute the target method through reflection, so as to perform resource control on the cloud platform.
When the target item is started, the target item can be scanned in a package, namely, the target method is scanned in the package corresponding to the target item. The target method is a method requiring resource operation to be executed on the cloud platform. After the target method is scanned, the target method can be registered in a registration machine according to the custom annotation on the method. Specifically, a method of resource operation to be performed on the cloud platform can be registered on the registrar by using the registrar principle. Thereafter, if the methods are required to be used, the method to be used can be acquired from the registrar.
Specifically, the method under the related package can be scanned by a package scanning mode, and the method is registered according to the invoker mapping and the enclosed, and the method is registered in the container resource organization map.
After registering the target method in the registration machine, if the target method needs to be called, a preset template method can be called in response to a call instruction for the target method, annotation identifiers corresponding to the target method are transmitted to the preset template method, the target method is acquired from a container of the registration machine through the annotation identifiers and the method representation, and then reflection is used for executing the target method, so that resource control of the cloud platform is realized. The reflection is used for executing the method, the specific implementation of the method is not concerned, and only the method is concerned, so that the specific implementation is developed by a developer.
And the preset template method can be generated in a template mode, and the preset template method is obtained by defining the same operation sequence.
Specifically, a preset template method can be called, annotation identifiers corresponding to the target method are transmitted to the preset template method, and corresponding methods to be executed are obtained from the registered container resourcecontainerMap through the annotation identifiers and the method representation.
As an alternative embodiment, the apparatus further comprises:
and the data acquisition unit is used for acquiring the base class data corresponding to the target method when the execution of the target method is completed.
In this embodiment, when the execution of the target method is completed, the base class data corresponding to the target method may be acquired. The application can adopt a generic structure, wherein the generic structure refers to a definition base class, and parameter transmission is performed by using subclasses or base classes. The base class data may be returned when the target method execution is complete.
As an alternative embodiment, the apparatus further comprises:
and the parameter transmission unit is used for carrying out parameter transmission based on the base class data or the sub-class data corresponding to the base class data.
In this embodiment, parameter transfer may be implemented by using the base class data or the sub class data corresponding to the base class data, so as to implement generic structure logic.
As an alternative embodiment, the method calling unit 203 is further configured to:
responding to a resource calling instruction triggered by the touch operation of a detected user, and determining method information indicated to be called by the resource calling instruction;
and if the method information is matched with the target method, determining that a calling instruction of the target method is detected.
In this embodiment, if a resource call instruction triggered by a touch operation of a user is detected, method information that is carried by the resource call instruction and indicates that the call needs to be performed may be determined. Wherein the method information herein may be represented as parameters. The user is usually a caller, and when the caller needs to call the resource operation in the cloud platform, the resource call instruction can be triggered, and parameters are carried. Then, the parameters in the method information can be analyzed to determine whether the parameters are matched with the target method, if so, the caller is determined to call the target method, and at the moment, the caller is determined to detect the call instruction to the target method.
As an optional implementation manner, before invoking the preset template method, the apparatus further includes:
the data verification unit is used for carrying out data verification based on the method information to obtain a data verification result; and if the data verification result indicates that the data verification is passed, performing resource operation.
In this embodiment, after detecting the resource calling instruction and before calling the preset template method, data verification may be performed on the parameters to obtain a data verification result. Wherein the data verification result includes that the data verification is passed or that the data verification is not passed. And if the data verification result indicates that the data verification is passed, performing resource operation. The resource operation is that the preset template method is called, and the annotation identification corresponding to the target method is transmitted to the preset template method, so that the preset template method obtains the target method from a container of the register based on the annotation identification.
In the embodiment of the invention, responding to a starting instruction of a target item, and carrying out package scanning on the target item to obtain a target method corresponding to the target item; the target method is a method for executing resource operation on the cloud platform; registering the target method in a registration machine according to the custom annotation on the target method; responding to a calling instruction of the target method, calling a preset template method, and transmitting an annotation identifier corresponding to the target method to the preset template method so that the preset template method obtains the target method from a container of the register based on the annotation identifier; executing the target method through reflection so as to control resources of the cloud platform; therefore, the method can be used for realizing the calling instruction of the response method by registering the method to the registration machine and calling the method from the registration machine and directly executing the method by reflecting the executing method, so that the resource control of the cloud platform is carried out without paying attention to historical code logic by a caller, and the complexity of the resource control of the cloud platform is reduced.
Having described the method and apparatus of the exemplary embodiments of the present invention, reference will now be made to fig. 3 for describing a computer-readable storage medium of the exemplary embodiments of the present invention, and reference will be made to fig. 3 for showing a computer-readable storage medium that is an optical disc 30 and has stored thereon a computer program (i.e., a program product) that, when executed by a processor, implements the steps described in the above-described method embodiments, such as performing a packet scan on a target item in response to a start-up instruction for the target item, to obtain a target method corresponding to the target item; the target method is a method for executing resource operation on the cloud platform; registering the target method in a registration machine according to the custom annotation on the target method; responding to a calling instruction of the target method, calling a preset template method, and transmitting an annotation identifier corresponding to the target method to the preset template method so that the preset template method obtains the target method from a container of the register based on the annotation identifier; executing the target method through reflection so as to control resources of the cloud platform; the specific implementation of each step is not repeated here.
It should be noted that examples of the computer readable storage medium may also include, but are not limited to, a phase change memory (PRAM), a Static Random Access Memory (SRAM), a Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a flash memory, or other optical or magnetic storage medium, which will not be described in detail herein.
Having described the methods, media, and apparatus of exemplary embodiments of the present invention, next, computing devices for cloud platform-based resource control of exemplary embodiments of the present invention are described with reference to fig. 4.
FIG. 4 illustrates a block diagram of an exemplary computing device 40 suitable for use in implementing embodiments of the invention, the computing device 40 may be a computer system or a server. The computing device 40 shown in fig. 4 is merely an example and should not be taken as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 4, components of computing device 40 may include, but are not limited to: one or more processors or processing units 401, a system memory 402, a bus 403 that connects the various system components (including the system memory 402 and the processing units 401).
Computing device 40 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computing device 40 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 402 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 4021 and/or cache memory 4022. Computing device 40 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, ROM4023 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4 and commonly referred to as a "hard disk drive"). Although not shown in fig. 4, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media), may be provided. In such cases, each drive may be coupled to bus 403 through one or more data medium interfaces. The system memory 402 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the embodiments of the invention.
A program/utility 4025 having a set (at least one) of program modules 4024 may be stored, for example, in system memory 402, and such program modules 4024 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 4024 generally perform the functions and/or methodologies of the described embodiments of the present invention.
Computing device 40 may also communicate with one or more external devices 404 (e.g., keyboard, pointing device, display, etc.). Such communication may occur through an input/output (I/O) interface 405. Moreover, computing device 40 may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 406. As shown in fig. 4, network adapter 406 communicates with other modules of computing device 40, such as processing unit 401, etc., over bus 403. It should be appreciated that although not shown in fig. 4, other hardware and/or software modules may be used in connection with computing device 40.
The processing unit 401 executes various functional applications and data processing by running a program stored in the system memory 402, for example, performing packet scanning on a target item in response to a start instruction for the target item, resulting in a target method corresponding to the target item; the target method is a method for executing resource operation on the cloud platform; registering the target method in a registration machine according to the custom annotation on the target method; responding to a calling instruction of the target method, calling a preset template method, and transmitting an annotation identifier corresponding to the target method to the preset template method so that the preset template method obtains the target method from a container of the register based on the annotation identifier; and executing the target method through reflection so as to control the resources of the cloud platform. The specific implementation of each step is not repeated here. It should be noted that although in the above detailed description several units/modules or sub-units/sub-modules of a cloud platform based resource control device are mentioned, such a division is only exemplary and not mandatory. Indeed, the features and functionality of two or more units/modules described above may be embodied in one unit/module in accordance with embodiments of the present invention. Conversely, the features and functions of one unit/module described above may be further divided into ones that are embodied by a plurality of units/modules.
In the description of the present invention, it should be noted that the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, 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 through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
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 on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention 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 functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. 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.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Furthermore, although the operations of the methods of the present invention are depicted in the drawings in a particular order, this is not required to either imply that the operations must be performed in that particular order or that all of the illustrated operations be performed to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
Claims (4)
1. The resource control method based on the cloud platform is characterized by being applied to the cloud platform and comprising the following steps:
responding to a starting instruction of a target item, and carrying out package scanning on the target item to obtain a target method corresponding to the target item; the target method is a method for executing resource operation on the cloud platform;
registering the target method in a registration machine according to the custom annotation on the target method;
responding to a calling instruction of the target method, calling a preset template method, and transmitting an annotation identifier corresponding to the target method to the preset template method so that the preset template method obtains the target method from a container of the register based on the annotation identifier;
executing the target method through reflection so as to control resources of the cloud platform;
the method further comprises the steps of:
when the execution of the target method is completed, acquiring base class data corresponding to the target method;
the method further comprises the steps of:
based on the base class data or the sub-class data corresponding to the base class data, carrying out parameter transfer to realize general structural logic;
the method further comprises the steps of:
responding to a resource calling instruction triggered by the touch operation of a detected user, and determining method information indicated to be called by the resource calling instruction;
if the method information is matched with the target method, determining that a calling instruction for the target method is detected;
before the preset template method is called, the method further comprises the following steps:
performing data verification based on the method information to obtain a data verification result;
and if the data verification result indicates that the data verification is passed, performing resource operation.
2. The utility model provides a resource control device based on cloud platform which characterized in that is applied to cloud platform includes:
the method determining unit is used for responding to a starting instruction of a target item, carrying out package scanning on the target item and obtaining a target method corresponding to the target item; the target method is a method for executing resource operation on the cloud platform;
a method registration unit, configured to register the target method in a registration machine according to the custom annotation on the target method;
a method calling unit, configured to respond to a calling instruction for the target method, call a preset template method, and transmit an annotation identifier corresponding to the target method to the preset template method, so that the preset template method obtains the target method from a container of the register based on the annotation identifier;
the method execution unit is used for executing the target method through reflection so as to control resources of the cloud platform;
the apparatus further comprises:
the data acquisition unit is used for acquiring base class data corresponding to the target method when the execution of the target method is completed;
the apparatus further comprises:
the parameter transmission unit is used for carrying out parameter transmission based on the base class data or the sub-class data corresponding to the base class data so as to realize general structural logic;
the method call unit is further configured to:
responding to a resource calling instruction triggered by the touch operation of a detected user, and determining method information indicated to be called by the resource calling instruction;
if the method information is matched with the target method, determining that a calling instruction for the target method is detected;
the apparatus further comprises:
the data verification unit is used for carrying out data verification based on the method information to obtain a data verification result; and if the data verification result indicates that the data verification is passed, performing resource operation.
3. A computing device, the computing device comprising:
at least one processor, memory, and input output unit;
wherein the memory is for storing a computer program and the processor is for invoking the computer program stored in the memory to perform the method of claim 1.
4. A computer readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the method of claim 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310392738.6A CN116501414B (en) | 2023-04-12 | 2023-04-12 | Resource control method, device, medium and computing equipment based on cloud platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310392738.6A CN116501414B (en) | 2023-04-12 | 2023-04-12 | Resource control method, device, medium and computing equipment based on cloud platform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116501414A CN116501414A (en) | 2023-07-28 |
CN116501414B true CN116501414B (en) | 2023-12-26 |
Family
ID=87315939
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310392738.6A Active CN116501414B (en) | 2023-04-12 | 2023-04-12 | Resource control method, device, medium and computing equipment based on cloud platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116501414B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112181602A (en) * | 2020-10-23 | 2021-01-05 | 济南浪潮数据技术有限公司 | Resource arranging method and device, electronic equipment and storage medium |
CN114118986A (en) * | 2021-11-26 | 2022-03-01 | 新华三大数据技术有限公司 | Cloud service processing method, device, equipment and storage medium |
CN114138259A (en) * | 2021-11-29 | 2022-03-04 | 广州云徙科技有限公司 | System and method for constructing multi-micro-service distributed framework adaptive to multi-cloud platform |
CN114579405A (en) * | 2022-03-04 | 2022-06-03 | 北京沃东天骏信息技术有限公司 | Data processing method, data processing apparatus, electronic device, and storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20220360504A1 (en) * | 2021-05-05 | 2022-11-10 | International Business Machines Corporation | Adapting microservices to multi-platform deployments |
-
2023
- 2023-04-12 CN CN202310392738.6A patent/CN116501414B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112181602A (en) * | 2020-10-23 | 2021-01-05 | 济南浪潮数据技术有限公司 | Resource arranging method and device, electronic equipment and storage medium |
CN114118986A (en) * | 2021-11-26 | 2022-03-01 | 新华三大数据技术有限公司 | Cloud service processing method, device, equipment and storage medium |
CN114138259A (en) * | 2021-11-29 | 2022-03-04 | 广州云徙科技有限公司 | System and method for constructing multi-micro-service distributed framework adaptive to multi-cloud platform |
CN114579405A (en) * | 2022-03-04 | 2022-06-03 | 北京沃东天骏信息技术有限公司 | Data processing method, data processing apparatus, electronic device, and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN116501414A (en) | 2023-07-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108427705B (en) | Electronic device, distributed system log query method and storage medium | |
CN109871289B (en) | Remote Procedure Call (RPC) service generation method and device | |
CN110289983B (en) | Load balancing application creation method and device, computer equipment and storage medium | |
CN108427731A (en) | Processing method, device, terminal device and the medium of page code | |
CN111858296B (en) | Interface testing method, device, equipment and storage medium | |
CN112783568B (en) | Initialization method, device, equipment and storage medium of application program | |
CN110955409A (en) | Method and device for creating resources on cloud platform | |
CN110968296B (en) | Data acquisition method, device, equipment and readable storage medium | |
CN111597110A (en) | Page testing method and device, electronic equipment and storage medium | |
CN111507676A (en) | Method, device, storage medium and system for establishing and implementing business order flow | |
CN116501414B (en) | Resource control method, device, medium and computing equipment based on cloud platform | |
CN111625330B (en) | Cross-thread task processing method and device, server and storage medium | |
CN113468212A (en) | Event execution method and device and electronic equipment | |
CN113076084A (en) | Resource file processing method, device, equipment and storage medium | |
CN114201701B (en) | Method and device for identifying operating environment, storage medium, server and client | |
CN106951236B (en) | Plug-in development method and device | |
CN115033312A (en) | ElasticSearch data operation method and device | |
CN114416165A (en) | Interface publishing method, system, computer equipment and storage medium | |
CN108363614B (en) | Application service module management method and device and server | |
CN115514733A (en) | Configuration method and configuration device for domain name resolution service (DNS) | |
CN111124610A (en) | Method and device for calling application program in application container and storage medium | |
CN114115648B (en) | Data request processing method, device, equipment and storage medium | |
CN111857816A (en) | Register allocation method and device, electronic equipment and computer storage medium | |
CN115695504B (en) | Internet of things platform communication method, device, equipment and storage medium | |
CN111324368A (en) | Data sharing method and server |
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 |