CN115480922A - Resource information processing method, device, electronic equipment and storage medium - Google Patents
Resource information processing method, device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN115480922A CN115480922A CN202211219779.7A CN202211219779A CN115480922A CN 115480922 A CN115480922 A CN 115480922A CN 202211219779 A CN202211219779 A CN 202211219779A CN 115480922 A CN115480922 A CN 115480922A
- Authority
- CN
- China
- Prior art keywords
- resource configuration
- information
- configuration information
- resource
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000010365 information processing Effects 0.000 title claims abstract description 51
- 238000003672 processing method Methods 0.000 title claims abstract description 29
- 238000012545 processing Methods 0.000 claims abstract description 57
- 238000000034 method Methods 0.000 claims description 41
- 238000003780 insertion Methods 0.000 claims description 16
- 230000037431 insertion Effects 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 13
- 230000006978 adaptation Effects 0.000 claims description 12
- 230000008569 process Effects 0.000 claims description 12
- 238000005516 engineering process Methods 0.000 abstract description 4
- 238000013473 artificial intelligence Methods 0.000 abstract description 3
- 238000013468 resource allocation Methods 0.000 description 42
- 238000010586 diagram Methods 0.000 description 16
- 238000012986 modification Methods 0.000 description 13
- 230000004048 modification Effects 0.000 description 13
- 238000004891 communication Methods 0.000 description 12
- 230000004044 response Effects 0.000 description 9
- 230000000694 effects Effects 0.000 description 7
- 238000012360 testing method Methods 0.000 description 7
- 238000004519 manufacturing process Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 230000001960 triggered effect Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 239000008186 active pharmaceutical agent Substances 0.000 description 1
- 239000003242 anti bacterial agent Substances 0.000 description 1
- 229940088710 antibiotic agent Drugs 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5072—Grid computing
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Stored Programmes (AREA)
Abstract
The disclosure provides a resource information processing method and device, electronic equipment and a storage medium, and relates to the technical field of artificial intelligence, in particular to the fields of cloud computing, cloud service, container technology and the like. The specific implementation scheme is as follows: acquiring first resource configuration information and second resource configuration information, wherein the first resource configuration information comprises a resource configuration item and a first resource configuration item value, the resource configuration item is a resource configuration item corresponding to a first system environment, the first resource configuration item value is a resource configuration item value corresponding to a second system environment, the second resource configuration information comprises a target resource configuration item and preset placeholder information, the target resource configuration item is a resource configuration item corresponding to the second system environment, the preset placeholder information is used for representing the position of the second resource configuration item value corresponding to the target resource configuration item, and the resource configuration item is at least part of the target resource configuration item; and processing the second resource configuration information based on the first resource configuration information to obtain target resource configuration information.
Description
Technical Field
The present disclosure relates to the field of artificial intelligence technology, and in particular, to the field of cloud computing, cloud services, container technology, and the like. In particular, the invention relates to a resource information processing method, a resource information processing device, an electronic device and a storage medium.
Background
With the development of computer technology, cloud computing and cloud services have also been developed. In cloud computing and cloud service, resource information processing is involved, and resources related to a first system environment need to be applied to a second system environment. For example, resources that pass verification in a test environment are applied to a production environment, and the like.
Disclosure of Invention
The disclosure provides a resource information processing method, a resource information processing device, an electronic device and a storage medium.
According to an aspect of the present disclosure, there is provided a resource information processing method including: acquiring first resource configuration information and second resource configuration information, wherein the first resource configuration information includes a resource configuration item and a first resource configuration item value, the resource configuration item is a resource configuration item corresponding to a first system environment, the first resource configuration item value is a resource configuration item value corresponding to a second system environment, a resource configuration item corresponding to the first resource configuration item value corresponds to the resource configuration item, the second resource configuration information includes a target resource configuration item and predetermined placeholder information, the target resource configuration item is a resource configuration item corresponding to the second system environment, the predetermined placeholder information is used for representing a position of a second resource configuration item value corresponding to the target resource configuration item, and the resource configuration item is at least a part of the target resource configuration item; and processing the second resource allocation information based on the first resource allocation information to obtain target resource allocation information, wherein the target resource allocation information is resource allocation information applied to the second system environment.
According to another aspect of the present disclosure, there is provided a resource information processing apparatus including: an obtaining module, configured to obtain first resource configuration information and second resource configuration information, where the first resource configuration information includes a resource configuration item and a first resource configuration item value, the resource configuration item is a resource configuration item corresponding to a first system environment, the first resource configuration item value is a resource configuration item value corresponding to a second system environment, the second resource configuration information includes a target resource configuration item and predetermined placeholder information, the target resource configuration item is a resource configuration item corresponding to the second system environment, and the predetermined placeholder information is used to represent a position of the second resource configuration item value corresponding to the target resource configuration item; and an obtaining module, configured to process the second resource allocation information based on the first resource allocation information to obtain target resource allocation information, where the target resource allocation information is resource allocation information applied to the second system environment.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to perform the method of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method according to the present disclosure.
According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method as described in the present disclosure.
According to the technical scheme, the preset occupation information is set in the second resource configuration information and used for representing the position of the second resource configuration item value of the target resource configuration item, and then the second resource configuration information is processed based on the first resource configuration information, so that the target resource configuration applied to the second system environment can be obtained, the second resource configuration information is modified once, the target resource configuration information (at least part of the target resource configuration information) can take effect once in the second system environment, the modification complexity is reduced, and the resource information processing efficiency is improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 schematically shows an exemplary system architecture to which the resource information processing method and apparatus may be applied, according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow diagram of a resource information processing method according to an embodiment of the disclosure;
FIG. 3A schematically illustrates a schematic diagram of a resource information processing method according to an embodiment of the present disclosure;
FIG. 3B schematically illustrates an example schematic diagram of processing the first resource configuration information and the second resource configuration information with a processing routine to obtain target resource configuration information according to an embodiment of the disclosure;
fig. 3C schematically illustrates an example schematic diagram of acquiring first resource configuration information in a case that it is detected that the resource configuration interface receives the first resource configuration operation according to an embodiment of the present disclosure;
fig. 3D schematically illustrates an example schematic diagram of obtaining second resource configuration information in a case that it is detected that the resource configuration interface receives the second resource configuration operation according to an embodiment of the present disclosure;
fig. 3E schematically illustrates an example schematic diagram of replacing the predetermined placeholder information with the first resource configuration item value to obtain the target resource configuration information, in a case that it is determined that the target resource configuration item matches the resource configuration item, according to an embodiment of the present disclosure;
fig. 4 schematically shows a block diagram of a resource information processing apparatus according to an embodiment of the present disclosure; and
fig. 5 schematically shows a block diagram of an electronic device adapted to implement a resource information processing method according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of embodiments of the present disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Since the first system environment and the second system environment are different, in the case of applying the configured resource configuration information of the resource verified by the first system environment to the second system environment, the configured resource configuration information needs to be modified so as to be applicable to the second system environment. For example, the first system environment may include a test environment. The second system environment may include a production environment. A test environment may refer to an environment in which a product is tested. A production environment (i.e., an online environment) may refer to an environment in which a product is formally run.
Therefore, the embodiment of the disclosure provides a resource information processing scheme. For example, first resource configuration information and second resource configuration information are obtained. The first resource configuration information may include a resource configuration item and a first resource configuration item value. The resource configuration item may be a resource configuration item corresponding to the first system environment. The first resource allocation item value may be a resource allocation item value corresponding to the second system environment. The resource configuration item corresponding to the first resource configuration item value may correspond to a resource configuration item. The second resource configuration information may include a target resource configuration item and predetermined placeholder information. The target resource configuration item may be a resource configuration item corresponding to the second system environment. The predetermined placeholder information is used for characterizing a position of a second resource configuration item value corresponding to the target resource configuration item. The resource configuration item may be at least part of a target resource configuration item. And processing the second resource configuration information based on the first resource configuration information to obtain target resource configuration information. The target resource configuration information is resource configuration information applied to the second system environment.
The preset occupation information is set in the second resource configuration information and used for representing the position of the second resource configuration item value of the target resource configuration item, and then the second resource configuration information is processed based on the first resource configuration information, so that the target resource configuration applied to the second system environment can be obtained, the second resource configuration information is modified once, the target resource configuration information (at least part of the target resource configuration information) can be enabled to take effect once in the second system environment, the modification complexity is reduced, and the resource information processing efficiency is improved.
Fig. 1 schematically shows an exemplary system architecture to which the resource information processing method and apparatus may be applied according to an embodiment of the present disclosure.
It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios. For example, in another embodiment, an exemplary system architecture to which the resource information processing method and apparatus may be applied may include a terminal device, but the terminal device may implement the resource information processing method and apparatus provided in the embodiments of the present disclosure without interacting with a server.
As shown in fig. 1, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types. For example, at least one of a wired communication link and a wireless communication link, etc.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. Various communication client applications may be installed on the terminal devices 101, 102, 103. For example, at least one of a knowledge reading class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having display screens and supporting web browsing. For example, at least one of a smartphone, a tablet, a laptop portable computer, a desktop computer, and the like may be included.
The server 105 may be a server that provides various services. For example, the Server 105 may be a cloud Server, which is also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service extensibility in a conventional physical host and a VPS service (Virtual Private Server).
It should be noted that the resource information processing method provided by the embodiment of the present disclosure may be generally executed by the terminal device 101, 102, or 103. Accordingly, the resource information processing apparatus provided in the embodiment of the present disclosure may also be provided in the terminal device 101, 102, or 103.
Alternatively, the resource information processing method provided by the embodiment of the present disclosure may also be generally executed by the server 105. Accordingly, the resource information processing apparatus provided by the embodiment of the present disclosure may be generally disposed in the server 105. The resource information processing method provided by the embodiment of the present disclosure may also be executed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the resource information processing apparatus provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
It should be noted that the sequence numbers of the respective operations in the following methods are merely used as a representation of the operations for description, and should not be construed as representing the execution order of the respective operations. The method need not be performed in the exact order shown, unless explicitly stated.
Fig. 2 schematically shows a flowchart of a resource information processing method according to an embodiment of the present disclosure.
As shown in FIG. 2, the method 200 includes operations S210-S220.
In operation S210, first resource configuration information and second resource configuration information are acquired.
In operation S220, the second resource allocation information is processed based on the first resource allocation information to obtain target resource allocation information.
According to an embodiment of the present disclosure, the first resource configuration information may include a resource configuration item and a first resource configuration item value. The resource configuration item may be a resource configuration item corresponding to the first system environment. The first resource allocation item value may be a resource allocation item value corresponding to the second system environment. The resource configuration item corresponding to the first resource configuration item value may correspond to a resource configuration item. The second resource configuration information may include a target resource configuration item and predetermined placeholder information. The target resource configuration item may be a resource configuration item corresponding to the second system environment. The predetermined placeholder information can be used to characterize a location of a second resource configuration item value corresponding to the target resource configuration item. The resource configuration item can be at least part of a target resource configuration item.
According to an embodiment of the present disclosure, the resource configuration information may refer to information for describing a resource. A resource may refer to an object that can be applied, allocated, and used. The resources are divided from various dimensions, and may be divided into different types. For example, from a software and hardware dimension, the resources may include at least one of: hardware resources and software resources, etc. For example, the hardware resources may include at least one of: a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a memory, and the like. The CPU may include at least one of: the main frequency of the CPU, the core number of the CPU, the thread number of the CPU, the multi-level cache of the CPU, the thermal design power consumption of the CPU and the like. The GPU may include at least one of: the core number of the GPU, the frequency of the GPU, the capacity of the GPU and the like. The memory may include at least one of: the size of the memory and the frequency of the memory, etc. The software resources may include at least one of: system software resources and application software resources, etc. The system software resources may include at least one of: operating system resources and supporting software resources. From the functional dimension, the resources may include at least one of: computing resources, storage resources, network resources, and the like.
According to the embodiment of the disclosure, the resources can be managed in a container mode, so that the resources can be deployed and scheduled. The resources may include at least one of: kubernets (i.e., K8S) resources and Docker resources. For example, the K8S resource may be a K8S resource in a private cloud.
According to an embodiment of the present disclosure, the K8S resource may include at least one of: cluster level resources, workload type resources, service discovery and load balancing resources, configuration and storage types, storage volumes of a particular type, and metadata. The cluster-level resources may include at least one of: name (i.e., name), name (i.e., namespace), label (i.e., tag), label selector, node (i.e., node), role (i.e., role), and ClusterRole (i.e., cluster Role), among others. The workload type resources may include at least one of: pod, replicaSet (i.e., RC), pod controller, and DaemonSet (i.e., daemon set). The service discovery and load balancing resources may include at least one of: service and Ingress. The configuration and storage types may include at least one of: volume (i.e., storage Volume) and CSI (Container Storage Interface). The particular type of storage volume may include at least one of: configMap, secret and DownwardAPI (Application Programming Interface).
According to embodiments of the present disclosure, pod may refer to the smallest deployable unit of work in K8S. The Pod may run multiple containers. The Pod controller may refer to a template for initiating a Pod. The Pod controller may include at least one of: a Deployment (i.e., deployment) controller, a Pod controller for managing stateful applications (i.e., stateful set controller), a Pod controller for managing tasks (i.e., job controller), and a Pod controller for managing timed tasks (i.e., cronjob controller), among others.
According to an embodiment of the present disclosure, namespace may refer to a method capable of isolating various resources in K8S. Namespace may refer to a virtual set group inside K8S. The Namespace may include at least one of: default (i.e., default), kube-System, and Kube-public. Label can be used to classify management resources. A Label can be characterized as ": key = value ". A Label selector can be used to select a predetermined Label. The Label selector may comprise at least one of: an equivalence relation-based Label selector and a set relation-based Label selector. The equivalence relations may include at least one of: equal to and unequal to. The set relationship may include at least one of: belonging, not belonging and existing.
According to an embodiment of the present disclosure, service may refer to an external access interface of Pod for providing the same Service. Service has a network address and a port, and provides load balancing for the Pod.
According to an embodiment of the present disclosure, a resource may include at least one resource item. The resource items may include at least one of: universal resource items and non-universal resource items. A universal resource item may refer to a resource item that has commonality. Commonality may refer to being used in at least two locations of a service. For example, the universal resource items may include at least one of: entry and network address, etc. The entry may include at least one of: account number and password, etc. The network address may include at least one of: MAC (Media Access Control) address, IP (Internet Protocol) address, and Port (i.e., port). A non-universal resource item may refer to a resource item that does not have commonality. The resource configuration information may include at least one of: universal resource configuration item information and non-universal resource configuration item information.
According to an embodiment of the present disclosure, the first system environment may include a test environment. The second system environment may include a production environment.
According to an embodiment of the present disclosure, the first resource configuration information may include a resource configuration item and a first resource configuration item value. The resource configuration item may be a resource configuration item applied to the first system environment. The resource configuration item corresponding to the first resource configuration item value may correspond to the resource configuration item. The first resource allocation item value may be obtained by modifying the allocated resource allocation item value according to the resource allocation item value corresponding to the resource allocation item and the system environment information of the second system environment. Alternatively, the first resource allocation item value may be determined according to system environment information of the second system environment.
According to an embodiment of the present disclosure, the second resource configuration information may include a target resource configuration item and predetermined placeholder information. The target resource configuration information may be resource configuration information applied to the second system environment. The target resource configuration information may include a target resource configuration item and a second resource configuration item value. The resource configuration item in the first resource configuration information may be at least part of a target resource configuration item. For example, the resource configuration item in the first resource configuration information may be a match to the target resource configuration item. Alternatively, the resource configuration item in the first resource configuration information may be partially matched with the target resource configuration item. The target resource configuration item may be a predetermined global variable.
According to an embodiment of the present disclosure, the first system environment may have at least one resource configuration item corresponding thereto. The second system environment may have at least one resource configuration item corresponding thereto. For each resource configuration item in the first system environment, there may be a resource configuration item in the second system environment corresponding thereto. The number of target resource configuration items may be at least one.
According to an embodiment of the present disclosure, the target resource configuration information may be at least one of resource configuration information for kubernets and resource configuration information for Docker. The data formats of the first resource configuration information, the second resource configuration information, and the target resource configuration information may be configured according to an actual service requirement, which is not limited herein. For example, the data formats may include YAML (i.e., YAML Ain't Markup Language) and JSON (Java Script Object Notification).
According to an embodiment of the present disclosure, the first resource configuration information may be stored in a first data table. The second resource configuration information may be stored in a second data table. The first resource configuration information may include a resource configuration item corresponding to the first system environment and a first resource configuration item value corresponding to the second system environment. The resource configuration item may be a universal resource configuration item. The resource configuration items may be predetermined global variables. The number of resource configuration items may be at least one. The predetermined global variable may be a variable having a file scope. A file scope may refer to the range from the defined line of code to the end of the file. The resource configuration item and the first resource configuration item Value may exist in the form of a Key-Value pair (i.e., key-Value). The resource configuration item may refer to Key. The first resource configuration item Value may refer to Value. For example, the resource configuration item information may be ", value _ name": "1 \ u password", "value": "123456". The resource configuration item may be "1 \ u password". The first resource allocation item value may be "123456". Alternatively, the first resource configuration information may be "luejname": "1_username", "value": "test". The resource configuration item may be "1 \ u username". The first resource configuration item value may be "test".
According to an embodiment of the present disclosure, the second resource configuration information may include a target resource configuration item and predetermined placeholder information. The predetermined placeholder information may correspond one-to-one with the target resource configuration item. The format of the predetermined placeholder information may be configured according to actual service requirements, which is not limited herein. For example, the format of the predetermined placeholder information may be different from other placeholder information involved in the resource information processing. Further, if there are a plurality of predetermined placeholders, formats of the plurality of predetermined placeholders are different from each other. According to an embodiment of the present disclosure, the second resource configuration information may further include at least one of: application interface version (i.e., API), resource class (i.e., kidd), resource Metadata (i.e., metadata), definition manifest (i.e., spec), and current state (i.e., status). APIVerson can refer to which group and version a resource belongs. Resource metadata may be used to describe attribute information for a resource. The definition manifest may be used to describe the expected state of the resource. The current state may be used to describe the current state of the resource.
According to an embodiment of the present disclosure, the resource metadata may include at least one of: name, nameSpace, labels, and indications. Labels may be key-value data. The indications may be non-identifying key value data. The antibiotics may be in addition to Labels.
For example, the second resource configuration information may be "password: '{ { <xxx > past<xxx } }' ″. The target resource configuration item may be "password". The predetermined occupancy information may be "{ <xxx > past < × }. In addition, the second resource configuration information may further include "Metadata: name:1.Conf; namespace: defaults ".
According to an embodiment of the present disclosure, acquiring the first resource configuration information and the second resource configuration information may include: it may be determined whether a modification is to be made to the configured resource configuration information of the resource that applies to the first system environment. In the case where it is determined that the configured resource configuration information of the resource is to be modified, the first resource configuration information and the second resource configuration information may be acquired. And in the case that the configured resource configuration information of the resource is determined not to need to be modified, ending the execution of the resource information processing operation. In response to modifying the configured resource configuration information of the resource, acquiring the first resource configuration information and the second resource configuration information may include: in a case where the configured resource configuration information verified by the first system environment is applied to the second system environment, the first resource configuration information and the second resource configuration information are acquired in response to modification of the configured resource configuration information of the resource. The first system environment may include a test environment. The second system environment may include a production environment.
According to an embodiment of the present disclosure, acquiring the first resource configuration information and the second resource configuration information may include: and acquiring the first resource configuration information and the second resource configuration information when a resource information configuration instruction aiming at the configured resource configuration information is detected. Furthermore, in a case where a resource allocation instruction for the allocated resource allocation information is not detected, execution of the resource information processing operation is ended. The resource information configuration instruction may be an instruction for acquiring the first resource configuration information and the second resource configuration information. The resource information configuration instruction may be generated in response to detecting that a resource information modification operation is triggered. The resource information modification operation may include at least one of a click operation and a slide operation, etc.
According to the embodiment of the disclosure, under the condition that it is determined that the matching result of the resource configuration item of the first resource configuration information and the target resource configuration item of the second resource configuration information meets the predetermined matching condition, the predetermined placeholder information of the second resource configuration information is processed by using the first resource configuration item value to obtain the target resource configuration information. The predetermined matching condition may refer to the resource configuration item matching the target resource configuration item.
According to the embodiment of the disclosure, the preset occupancy information is set in the second resource configuration information, and the preset occupancy information is used for representing the position of the second resource configuration item value of the target resource configuration item, so that the second resource configuration information is processed based on the first resource configuration information, the target resource configuration applied to the second system environment can be obtained, the second resource configuration information is modified once, the target resource configuration information (at least part of the target resource configuration information) can be enabled to take effect once in the second system environment, the modification complexity is reduced, and the resource information processing efficiency is improved.
According to an embodiment of the present disclosure, the resource information processing method may further include the following operations.
And creating the resource configuration item and the target resource configuration item as a predetermined global variable.
According to an embodiment of the present disclosure, the resource configuration item and the target resource configuration item may be created as a predetermined global variable in response to detecting the global variable creation instruction.
According to the embodiment of the present disclosure, the target resource configuration item and the resource configuration item in the first resource configuration information may be set as variables outside the predetermined function, so that the target resource configuration item and the resource configuration item in the first resource configuration information are predetermined global variables.
According to embodiments of the present disclosure, the format of the predetermined placeholder information may be different from other placeholder information involved in the resource handling process.
According to the embodiment of the present disclosure, the format of the predetermined placeholder information may be configured according to actual service requirements, and is not limited herein. For example, the format of the predetermined placeholder information may be determined from a predetermined symbol and a predetermined string. The predetermined symbol may include at least one of: numeric symbols, mathematical symbols, and punctuation symbols. For example, the format of the predetermined occupancy information may be "{ <xx { <x × <x < × > }. The format of the predetermined placeholder information may include two left braces, a left tip brace, an item name, a right tip brace, a space, a target resource configuration item, a space, a left tip brace, an item name, a right tip brace, and two right braces.
For example, the format of the predetermined occupancy information may be "{ [ × × ] × [ × × ] }. The format of the predetermined place-holder information may include two left braces, a left middle brace, a project name, a right middle brace, a space, a target resource configuration item, a space, a left middle brace, a project name, a right middle brace, and two right braces.
For example, the format of the predetermined occupancy information may be "{ [ × × ] × } }". The format of the predetermined placeholder information may include two left braces, a left middle brace, an item name, a right middle brace, a target resource configuration item, and two right braces.
According to an embodiment of the present disclosure, operation S210 may include the following operations.
And displaying a resource configuration interface when a configured resource configuration information adaptation instruction aiming at the first system environment is detected. And under the condition that the resource configuration interface is detected to receive the resource configuration operation, acquiring first resource configuration information and second resource configuration information.
According to embodiments of the present disclosure, the adaptation instructions may be used to characterize instructions to adapt the configured resource configuration information of the first system environment to the second system environment.
According to an embodiment of the present disclosure, a resource configuration interface may refer to an interface capable of resource configuration. The resource configuration interface can include at least one resource configuration control. For example, the resource configuration control can include at least one of: selecting an operation control, inputting the operation control, inserting the operation control, importing the operation control, determining the operation control, canceling the operation control and the like. A resource configuration operation may refer to an operation corresponding to a resource configuration control.
According to an embodiment of the present disclosure, a resource configuration interface is presented in response to detecting an adaptation instruction for configured resource configuration information of a first system environment. And acquiring first resource configuration information and second resource configuration information in response to the fact that the resource configuration interface receives the resource configuration operation.
According to the embodiment of the disclosure, the resource configuration interface is displayed by detecting the adaptation instruction of the configured resource configuration information aiming at the first system environment, so that visual interface support is provided for the resource information processing operation, and the resource information processing operation is facilitated.
According to an embodiment of the present disclosure, the resource configuration operation may include a first resource configuration operation and a second resource configuration operation.
According to an embodiment of the present disclosure, in a case that it is detected that the resource configuration interface receives a resource configuration operation, acquiring the first resource configuration information and the second resource configuration information may include the following operations.
And acquiring first resource configuration information under the condition that the resource configuration interface is detected to receive the first resource configuration operation. And acquiring second resource configuration information under the condition that the resource configuration interface is detected to receive a second resource configuration operation.
According to an embodiment of the present disclosure, the first resource configuration operation may refer to a resource configuration operation corresponding to the first resource configuration information. For example, the first resource configuration operation may include a resource selection operation and a resource input operation. The second resource configuration operation may refer to a resource configuration operation corresponding to the second resource configuration information. For example, the second resource configuration operation may include a resource insertion operation and a resource input operation.
According to an embodiment of the present disclosure, the second resource configuration operation may include a resource input operation.
According to the embodiment of the disclosure, in a case that it is detected that the resource configuration interface receives the second resource configuration operation, acquiring the second resource configuration information may include the following operations.
And under the condition that the resource configuration interface is detected to receive the resource insertion operation, acquiring a target insertion position. And under the condition that the target insertion position is detected to receive the resource input operation, acquiring second resource configuration information.
According to an embodiment of the present disclosure, the target insertion position may refer to a position for inserting the second resource configuration information. The resource insertion operation may refer to an operation for determining a location of the second resource configuration information. The resource insertion operation may include one of a click operation and a selection operation. The resource input operation may refer to an operation for acquiring the second resource configuration information. The resource input operation may include one of a selection operation and an input operation.
According to an embodiment of the present disclosure, operation S220 may include the following operations.
A processing routine is called. And processing the second resource configuration information by using the processing routine based on the first resource configuration information to obtain target resource configuration information.
According to an embodiment of the present disclosure, the processing routine may refer to a routine for processing the second resource configuration information using the first resource configuration information. The processing routine may include processing logic how to process the second resource configuration information using the first resource configuration information to obtain target resource configuration information.
According to the embodiment of the disclosure, the template language of the processing routine may be configured according to actual business requirements, and is not limited herein. For example, the template language may include at least one of: jinja2 and Django. The processing routine may include Template (). Render ().
For example, the processing routine may be a jinja2.Template (). Render () routine. Input parameters of jinja2.Template (). Render () may include first resource configuration information and second resource configuration information, and an output result may be target resource configuration information.
According to the embodiment of the disclosure, since the second resource configuration information includes the predetermined placeholder information, and the predetermined placeholder information is used for representing the position of the second resource configuration item value of the target resource configuration item, the first resource configuration information and the second resource configuration information are processed by the processing routine to obtain the target resource configuration information applied to the second system environment, and the second resource configuration information is modified once, so that the target resource configuration information (at least part of) applied to the second system environment can take effect once, the modification complexity is reduced, and the resource processing efficiency is improved.
According to an embodiment of the present disclosure, the target resource configuration item may be a predetermined global variable.
According to an embodiment of the present disclosure, processing the second resource configuration information based on the first resource configuration information by using the processing routine to obtain the target resource configuration information may include the following operations.
And under the condition that the target resource configuration item is matched with the resource configuration item, replacing the preset placeholder information with the first resource configuration item value to obtain target resource configuration information.
According to an embodiment of the present disclosure, matching the target resource configuration item with the resource configuration item may include the target resource configuration item being consistent with the resource configuration item. It may be determined whether the target resource configuration item matches the resource configuration item. If the target resource configuration item is determined to be matched with the resource configuration item, the predetermined placeholder information in the second resource configuration information can be replaced by the first resource configuration item value of the resource configuration item, so that the target resource configuration information is obtained. If the target resource configuration item is determined not to be matched with the resource configuration item, the first resource configuration item value does not need to be used for replacing the preset placeholder information in the second resource configuration information, and therefore a replacement failure result representing replacement failure can be obtained. For example, the operation of replacing the predetermined placeholder information with the first resource configuration item value to obtain the target resource configuration information may be finished. In addition, the predetermined placeholder information may be manually replaced with the first resource allocation item value.
For example, the first resource configuration information may include a resource configuration item "password" and a first resource configuration item value of "123456". The second resource configuration information may include a target resource configuration item "password" and predetermined placeholder information "{ <xxx > password < × > }". The target resource configuration item "password" is a predetermined global variable.
Since the target resource configuration "password" matches the resource configuration "password", the predetermined placeholder information "{ <" × > password < × > } "in the second resource configuration information may be replaced with the first resource configuration value" 123456", resulting in the target resource configuration information comprising the target resource configuration" password "and the first resource configuration value" 123456", e.g., the target resource configuration information" password: '123456'". The second resource allocation value is equal to the first resource allocation value.
According to the embodiment of the disclosure, the preset placeholder information comprises the preset global variable, and the second resource configuration information comprises the preset placeholder information, so that under the condition that the target resource configuration item is matched with the resource configuration item, the preset placeholder information in the second resource configuration information is replaced by the first resource configuration item value of the resource configuration item to obtain the target resource configuration information, and the second resource configuration information is modified once, so that the target resource configuration information (at least part) applied to the second system environment can be validated once, the modification complexity is reduced, and the resource processing efficiency is improved.
According to an embodiment of the present disclosure, the resource information processing method may further include the following operations.
And determining a placeholder information replacement strategy. And creating a processing routine according to the occupancy information replacement strategy.
According to an embodiment of the disclosure, the placeholder information replacement policy may refer to a policy how to process the second resource configuration information based on the first resource configuration information to obtain the target resource configuration information. For example, the placeholder information replacement policy may include a policy to replace predetermined placeholder information in the second resource configuration information with a first resource configuration item value.
According to embodiments of the present disclosure, the placeholder information replacement policy may be determined according to the occupancy configuration information. The placeholder configuration information may include a predetermined placeholder information replacement condition and a predetermined placeholder information format. In addition, the placeholder configuration information may further include at least one of: the predetermined placeholder information identifier and the predetermined placeholder information scope. The predetermined placeholder information replacement condition may refer to what condition needs to be satisfied in which case a placeholder information replacement operation is performed. The predetermined placeholder information format may refer to a format of the predetermined placeholder information. The predetermined placeholder information identifier may be used to characterize the predetermined placeholder information. The predefined placeholder information scope may characterize an application scope of the predefined placeholder information.
According to the embodiment of the disclosure, the processing routine can be created according to the placeholder information replacement policy, so that the processing routine can process the second resource configuration information based on the first resource configuration information to obtain the target resource configuration information.
According to an embodiment of the present disclosure, the resource information processing method may further include the following operations.
And under the condition that the resource creating instruction is detected, creating the target resource for the second system environment according to the target resource configuration information.
According to an embodiment of the present disclosure, a resource creation instruction may refer to an instruction for creating a target resource. The resource creation instruction may be generated upon detecting that a resource creation operation is triggered.
According to an embodiment of the present disclosure, in case of detecting the resource creation instruction, the target resource for the second system environment may be created using at least one of a Hyper Text Transfer Protocol (HTTP) interface and a Client instruction.
According to an embodiment of the present disclosure, creating a target resource for the second system environment according to the target resource configuration information may include the following operations.
A resource creation routine is called. The target resource configuration information is processed with a resource creation routine to create a target resource for the second system environment.
According to embodiments of the present disclosure, a resource creation routine may refer to a routine for creating a target resource. For example, the resource creation routine may refer to at least one of a creation routine related to an HTTP (Hyper Text Transfer Protocol) interface and a creation routine related to a Client instruction.
The resource information processing method according to the embodiment of the disclosure is further described with reference to fig. 3A to fig. 3E.
Fig. 3A schematically illustrates a principle schematic diagram of a resource information processing method according to an embodiment of the present disclosure.
As shown in fig. 3A, in 300A, in response to a configured resource configuration information of a resource being modified, in case an adaptation instruction 301 for the configured resource configuration information is detected, a resource configuration interface 302 is exposed. When it is detected that the resource configuration interface 302 receives a resource configuration operation, the original resource configuration information 303 is obtained. The original resource configuration information 303 may include first resource configuration information 303_1 and second resource configuration information 303_2. A processing routine 304 is called. The first and second resource configuration information 303_1 and 303_2 are processed by the processing routine 304 to obtain target resource configuration information 305. Upon detection of a resource creation instruction, a target resource 306 for the production environment is created based on the target resource configuration information 305.
Fig. 3B schematically illustrates an example schematic diagram of processing the first resource configuration information and the second resource configuration information by a processing routine to obtain target resource configuration information according to an embodiment of the present disclosure.
As shown in FIG. 3B, in 300B, first resource configuration information 307 may include a resource configuration item 307 u 1 and a first resource configuration item value 307 u 2. The second resource configuration information 308 may include a target resource configuration item 308_1 and predetermined placeholder information 308_2. The predetermined placeholder information 308_2 may include the target resource configuration item 308_1.
In the event that it is determined that the target resource configuration item 308_1 matches the resource configuration item 307_1, the predetermined placeholder information 308_2 is replaced with the first resource configuration item value 307_2, resulting in target resource configuration information 309. Target resource configuration information 309 may include a target resource configuration item 308_1 and a first resource configuration item value 307_2. The second resource allocation item value is equal to the first resource allocation item value 307_2.
Fig. 3C schematically illustrates an example schematic diagram of acquiring first resource configuration information in a case that it is detected that the resource configuration interface receives the first resource configuration operation according to the embodiment of the present disclosure.
As shown in FIG. 3C, in 300C, first resource configuration information 310_1 is set in resource configuration interface 310. Resource configuration interface 310 may include an area for configuring first resource configuration information 310_1, a determine control 310_2, and a cancel control 310_3.
In response to detecting that a resource input operation at the resource configuration interface 310 is triggered, the first resource configuration information 310_1 is acquired. The first resource configuration information 310_1 may include a resource configuration item 310_1 _1and a first resource configuration item value 310_1_2. Resource configuration item 310_1 _1is "aa". The first resource allocation item value 310_1_2 is "11". After completing the first resource configuration operation of the first resource configuration information 310_1, the determination control 310 _2may be clicked to effect the save.
Fig. 3D schematically illustrates an example schematic diagram of obtaining second resource configuration information in a case that it is detected that the resource configuration interface receives the second resource configuration operation according to an embodiment of the present disclosure.
As shown in FIG. 3D, in 300D, second resource configuration information 310_4 is set in resource configuration interface 310. Resource configuration interface 310 may include an area for configuring second resource configuration information 310_4, a determine control 310_2, and a cancel control 310_3.
In response to detecting that the resource insertion operation and the resource input operation of the resource configuration interface 310 are triggered, the second resource configuration information 310_4 is acquired. Second resource configuration information 310_4 may include a target resource configuration item 310_4 _1and predetermined placeholder information 310_4_2. Target resource configuration item 310_4 _1is "aa". Predetermined placeholder information 310_4 _2is "{ < × > aa < × > }". Predetermined placeholder information 310_4_2 may include target resource configuration item 310_4_1.. After completing the second resource configuration operation of the second resource configuration information 310_4, the determination control 310 _2may be clicked to effect the save.
Fig. 3E schematically illustrates an example schematic diagram of replacing the predetermined placeholder information with the first resource configuration item value to obtain the target resource configuration information when it is determined that the target resource configuration item matches the resource configuration item according to an embodiment of the present disclosure.
As shown in FIG. 3E, in 300E, target resource configuration information 310_1 is obtained in resource configuration interface 310. Resource configuration interface 310 may include an area for exposing target resource configuration information 310_5, a determine control 310_2, and a cancel control 310_3.
Because the target resource allocation item 310 u 4_1 ' aa "matches the resource allocation item 310 u 1_1 ' aa", the predetermined placeholder information 310 u 4_2"{ <x > aa < × > }" may be replaced with the first resource allocation item value 310 u 1_2 '11 "resulting in target resource allocation information 310 u 5 comprising the target resource allocation item 310 u 4_1 ' aa" and the first resource allocation item value 310 u 1_2 ' ″. Target resource configuration information 310_5 is "aa: '11'". After confirming that target resource configuration information 310_5 is correct, the determination control 310_2 may be clicked to effect the save.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
The above is only an exemplary embodiment, but not limited to this, and other resource information processing methods known in the art may also be included as long as the modification complexity of the resource configuration information can be reduced, and the resource processing efficiency can be improved.
Fig. 4 schematically shows a block diagram of a resource information processing apparatus according to an embodiment of the present disclosure.
As shown in fig. 4, the resource information processing apparatus 400 may include an obtaining module 410 and an obtaining module 420.
The obtaining module 410 is configured to obtain the first resource configuration information and the second resource configuration information. The first resource configuration information includes a resource configuration item and a first resource configuration item value. The resource configuration item is a resource configuration item corresponding to the first system environment. The first resource allocation item value is a resource allocation item value corresponding to the second system environment. The resource allocation item corresponding to the first resource allocation item value corresponds to the resource allocation item. The second resource configuration information includes a target resource configuration item and predetermined placeholder information. The target resource configuration item is a resource configuration item corresponding to the second system environment. The predetermined placeholder information is used for characterizing a position of a second resource configuration item value corresponding to the target resource configuration item. The resource configuration item is at least part of a target resource configuration item.
The obtaining module 420 is configured to process the second resource configuration information based on the first resource configuration information, so as to obtain target resource configuration information. The target resource configuration information is resource configuration information applied to the second system environment.
According to an embodiment of the present disclosure, the obtaining module 420 may include a first calling submodule and a first obtaining submodule.
And the first calling submodule is used for calling the processing routine.
And the first obtaining submodule is used for processing the second resource configuration information by utilizing the processing routine and based on the first resource configuration information to obtain target resource configuration information.
According to an embodiment of the present disclosure, the target resource configuration item is a predetermined global variable.
According to an embodiment of the present disclosure, the first obtaining sub-module may include an obtaining unit.
And the obtaining unit is used for replacing the preset placeholder information with the first resource configuration item value to obtain the target resource configuration information under the condition that the target resource configuration item is determined to be matched with the resource configuration item.
According to an embodiment of the present disclosure, the resource information processing apparatus 400 may further include a determination module and a first creation module.
And the determining module is used for determining the placeholder information replacement strategy.
And the first creating module is used for creating a processing routine according to the placeholder information replacement policy.
According to an embodiment of the present disclosure, the obtaining module 410 may include a presentation sub-module and a obtaining sub-module.
And the display sub-module is used for displaying the resource configuration interface under the condition that the adaptation instruction aiming at the configured resource configuration information is detected.
The obtaining sub-module is used for obtaining the first resource configuration information and the second resource configuration information under the condition that the resource configuration interface is detected to receive the resource configuration operation.
According to an embodiment of the present disclosure, the resource configuration operation may include a first resource configuration operation and a second resource configuration operation.
According to an embodiment of the present disclosure, the presentation submodule may include a first obtaining unit and a second obtaining unit.
The first obtaining unit is used for obtaining the first resource configuration information under the condition that the resource configuration interface is detected to receive the first resource configuration operation.
And the second obtaining unit is used for obtaining the second resource configuration information under the condition that the resource configuration interface is detected to receive the second resource configuration operation.
According to an embodiment of the present disclosure, the second resource configuration operation may include a resource input operation.
According to an embodiment of the present disclosure, the second acquisition unit may include a first acquisition subunit and a second acquisition subunit.
The first obtaining subunit is configured to, when it is detected that the resource configuration interface receives a resource insertion operation, obtain a target insertion position.
And the second acquisition subunit is used for acquiring the second resource configuration information under the condition that the target insertion position is detected to receive the resource input operation.
According to an embodiment of the present disclosure, the resource information processing apparatus 400 may further include a second creation module.
And the second creating module is used for creating the target resource for the second system environment according to the target resource configuration information under the condition that the resource creating instruction is detected.
According to an embodiment of the present disclosure, the second creating module may include a second calling submodule and a creating submodule.
And the second calling submodule is used for calling the resource creating routine.
A creation sub-module for processing the target resource configuration information with a resource creation routine to create a target resource for the second system environment.
According to the embodiment of the disclosure, the format of the predetermined placeholder information is different from other placeholder information involved in the resource processing process.
According to an embodiment of the present disclosure, the target resource configuration information is resource configuration information for kubernets.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
According to an embodiment of the present disclosure, an electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described above.
According to an embodiment of the present disclosure, a non-transitory computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the method as described above.
According to an embodiment of the disclosure, a computer program product comprising a computer program which, when executed by a processor, implements the method as described above.
Fig. 5 schematically shows a block diagram of an electronic device adapted to implement a resource information processing method according to an embodiment of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in the electronic device 500 are connected to the I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, or the like; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508, such as a magnetic disk, optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 501 may be a variety of general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 501 executes the respective methods and processes described above, such as the resource information processing method. For example, in some embodiments, the resource information processing method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 500 via the ROM 502 and/or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the resource information processing method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the resource information processing method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.
Claims (25)
1. A resource information processing method includes:
acquiring first resource configuration information and second resource configuration information, wherein the first resource configuration information comprises a resource configuration item and a first resource configuration item value, the resource configuration item is a resource configuration item corresponding to a first system environment, the first resource configuration item value is a resource configuration item value corresponding to a second system environment, a resource configuration item corresponding to the first resource configuration item value corresponds to the resource configuration item, the second resource configuration information comprises a target resource configuration item and predetermined placeholder information, the target resource configuration item is a resource configuration item corresponding to the second system environment, the predetermined placeholder information is used for representing the position of a second resource configuration item value corresponding to the target resource configuration item, and the resource configuration item is at least part of the target resource configuration item; and
and processing the second resource configuration information based on the first resource configuration information to obtain target resource configuration information, wherein the target resource configuration information is resource configuration information applied to the second system environment.
2. The method of claim 1, wherein the processing the second resource configuration information based on the first resource configuration information to obtain target resource configuration information comprises:
calling a processing routine; and
and processing the second resource configuration information by using the processing routine and based on the first resource configuration information to obtain the target resource configuration information.
3. The method of claim 2, wherein the target resource configuration item is a predetermined global variable;
wherein, the processing the second resource configuration information by using the processing routine and based on the first resource configuration information to obtain the target resource configuration information includes:
and under the condition that the target resource configuration item is matched with the resource configuration item, replacing the preset placeholder information with the first resource configuration item value to obtain the target resource configuration information.
4. The method of claim 2 or 3, further comprising:
determining an occupancy information replacement strategy; and
and creating the processing routine according to the occupancy information replacement strategy.
5. The method according to any one of claims 1 to 4, wherein the obtaining the first resource configuration information and the second resource configuration information comprises:
in the case of detecting an adaptation instruction for the configured resource configuration information of the first system environment, displaying a resource configuration interface, wherein the adaptation instruction is used for characterizing the adaptation of the configured resource configuration information of the first system environment to the second system environment; and
and acquiring the first resource configuration information and the second resource configuration information under the condition that the resource configuration interface is detected to receive resource configuration operation.
6. The method of claim 5, wherein the obtaining the first resource configuration information and the second resource configuration information upon detecting that the resource configuration interface receives a resource configuration operation comprises:
under the condition that the resource configuration interface is detected to receive a first resource configuration operation, acquiring first resource configuration information; and
under the condition that the resource configuration interface is detected to receive a second resource configuration operation, acquiring second resource configuration information;
wherein the resource configuration operation comprises the first resource configuration operation and the second resource configuration operation.
7. The method of claim 6, wherein the obtaining the second resource configuration information in the case that it is detected that the resource configuration interface receives a second resource configuration operation comprises:
under the condition that the resource configuration interface is detected to receive a resource insertion operation, acquiring a target insertion position; and
under the condition that the target inserting position receives a resource input operation, acquiring second resource configuration information;
wherein the second resource configuration operation comprises the resource input operation.
8. The method of any of claims 1-7, further comprising:
and under the condition that a resource creating instruction is detected, creating a target resource for the second system environment according to the target resource configuration information.
9. The method of claim 8, wherein said creating a target resource for the second system environment according to the target resource configuration information comprises:
calling a resource creating routine; and
processing the target resource configuration information with the resource creation routine to create a target resource for the second system environment.
10. The method according to any one of claims 1 to 9, wherein the format of the predetermined placeholder information is different from the format of other placeholder information involved in the resource handling process.
11. The method of any one of claims 1 to 10, wherein the target resource configuration information is resource configuration information for kubernets.
12. A resource information processing apparatus comprising:
an obtaining module, configured to obtain first resource configuration information and second resource configuration information, where the first resource configuration information includes a resource configuration item and a first resource configuration item value, the resource configuration item is a resource configuration item corresponding to a first system environment, the first resource configuration item value is a resource configuration item value corresponding to a second system environment, a resource configuration item corresponding to the first resource configuration item value corresponds to the resource configuration item, the second resource configuration information includes a target resource configuration item and predetermined placeholder information, the target resource configuration item is a resource configuration item corresponding to the second system environment, the predetermined placeholder information is used to represent a location of a second resource configuration item value corresponding to the target resource configuration item, and the resource configuration item is at least a part of the target resource configuration item; and
an obtaining module, configured to process the second resource configuration information based on the first resource configuration information to obtain target resource configuration information, where the target resource configuration information is resource configuration information applied to the second system environment.
13. The apparatus of claim 12, wherein the means for obtaining comprises:
the first calling sub-module is used for calling the processing routine; and
and the first obtaining submodule is used for processing the second resource configuration information by using the processing routine and based on the first resource configuration information to obtain the target resource configuration information.
14. The apparatus of claim 13, wherein the target resource configuration item is a predetermined global variable;
wherein the first obtaining submodule includes:
an obtaining unit, configured to replace the predetermined placeholder information with the first resource configuration item value to obtain the target resource configuration information, when it is determined that the target resource configuration item matches the resource configuration item.
15. The apparatus of claim 13 or 14, further comprising:
the determining module is used for determining an occupancy information replacement strategy; and
and the first creating module is used for creating the processing routine according to the occupancy information replacement policy.
16. The apparatus of any one of claims 13-15, wherein the obtaining means comprises:
the display sub-module is used for displaying a resource configuration interface under the condition that an adaptation instruction aiming at the configured resource configuration information of the first system environment is detected, wherein the adaptation instruction is used for representing the adaptation of the configured resource configuration information of the first system environment to the second system environment; and
the obtaining sub-module is configured to obtain the first resource configuration information and the second resource configuration information when it is detected that the resource configuration interface receives a resource configuration operation.
17. The apparatus of claim 16, wherein the display sub-module comprises:
the first acquisition unit is used for acquiring the first resource configuration information under the condition that the resource configuration interface is detected to receive a first resource configuration operation; and
a second obtaining unit, configured to obtain second resource configuration information when a second resource configuration operation received by the resource configuration interface is detected;
wherein the resource configuration operation comprises the first resource configuration operation and the second resource configuration operation.
18. The apparatus of claim 17, wherein the second obtaining unit comprises:
the first acquiring subunit is configured to acquire a target insertion position when it is detected that the resource configuration interface receives a resource insertion operation; and
a second obtaining subunit, configured to, when it is detected that the target insertion location receives a resource input operation, obtain the second resource configuration information;
wherein the second resource configuration operation comprises the resource input operation.
19. The apparatus of any of claims 12-18, further comprising:
and the second creating module is used for creating the target resource used for the second system environment according to the target resource configuration information under the condition that the resource creating instruction is detected.
20. The apparatus of claim 19, wherein the second creating module comprises:
the second calling sub-module is used for calling a resource creating routine; and
a creation sub-module to process the target resource configuration information with the resource creation routine to create a target resource for the second system environment.
21. The apparatus according to any one of claims 12 to 20, wherein the format of the predetermined placeholder information is different from the format of other placeholder information involved in the resource handling process.
22. The apparatus of any of claims 12-21, wherein the target resource configuration information is resource configuration information for kubernets.
23. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-11.
24. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method according to any one of claims 1 to 11.
25. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211219779.7A CN115480922A (en) | 2022-09-30 | 2022-09-30 | Resource information processing method, device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211219779.7A CN115480922A (en) | 2022-09-30 | 2022-09-30 | Resource information processing method, device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115480922A true CN115480922A (en) | 2022-12-16 |
Family
ID=84394023
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211219779.7A Pending CN115480922A (en) | 2022-09-30 | 2022-09-30 | Resource information processing method, device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115480922A (en) |
-
2022
- 2022-09-30 CN CN202211219779.7A patent/CN115480922A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021023149A1 (en) | Method and apparatus for dynamically returning message | |
CN111639027B (en) | Test method and device and electronic equipment | |
US11061669B2 (en) | Software development tool integration and monitoring | |
CN114389969B (en) | Method and device for testing client, electronic equipment and storage medium | |
CN113392346B (en) | Path processing method and device for resource file, electronic equipment and storage medium | |
CN112269706B (en) | Interface parameter verification method, device, electronic equipment and computer readable medium | |
CN113377665B (en) | Container technology-based testing method and device, electronic equipment and storage medium | |
CN113220420A (en) | Service monitoring method, device, equipment, storage medium and computer program product | |
CN112015468A (en) | Interface document processing method and device, electronic equipment and storage medium | |
CN114398023A (en) | File generation method and page configuration method and device | |
CN117667573A (en) | Cluster operation and maintenance method and device based on AI language model | |
CN112084000A (en) | Container cluster testing method and device | |
CN116545905A (en) | Service health detection method and device, electronic equipment and storage medium | |
CN116009847A (en) | Code generation method, device, electronic equipment and storage medium | |
CN116069497A (en) | Method, apparatus, device and storage medium for executing distributed task | |
CN115905322A (en) | Service processing method and device, electronic equipment and storage medium | |
CN115480922A (en) | Resource information processing method, device, electronic equipment and storage medium | |
CN113691403A (en) | Topological node configuration method, related device and computer program product | |
CN114706774A (en) | Interface test method, device, equipment and storage medium | |
CN114218313A (en) | Data management method, device, electronic equipment, storage medium and product | |
CN111708582A (en) | Online configuration method and device and electronic equipment | |
CN117768463A (en) | Method and device for simulating cloud mobile phone, electronic equipment and storage medium | |
CN115061664A (en) | Object conversion method and device, electronic equipment and storage medium | |
CN113342413A (en) | Method, apparatus, device, medium and product for processing components | |
CN117081939A (en) | Traffic data processing method, device, equipment 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 |