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
- configuration information
- 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
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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 OR CALCULATING; 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, device, electronic equipment, and storage medium, which relate to the field of artificial intelligence technology, and in particular to the fields of cloud computing, cloud service, and container technology. The specific implementation scheme is: obtaining the first resource configuration information and the second resource configuration information, the first resource configuration information includes resource configuration items and the first resource configuration item values, the resource configuration items are resource configuration items corresponding to the first system environment, The first resource configuration item value is a resource configuration item value corresponding to the second system environment, the second resource configuration information includes target resource configuration items and predetermined occupancy information, and the target resource configuration item is a resource configuration item corresponding to the second system environment , the predetermined occupancy information is used to represent the position of the value of the second resource configuration item corresponding to the target resource configuration item, and the resource configuration item is at least part of the target resource configuration item; the second resource configuration information is processed based on the first resource configuration information , to get the target resource configuration information.
Description
技术领域technical field
本公开涉及人工智能技术领域,尤其涉及云计算、云服务、容器技术等领域。具体地,涉及一种资源信息处理方法、装置、电子设备以及存储介质。The present disclosure relates to the field of artificial intelligence technology, and in particular to fields such as cloud computing, cloud service, and container technology. Specifically, it relates to a resource information processing method, device, electronic equipment and storage medium.
背景技术Background technique
随着计算机技术的发展,云计算和云服务也得到了发展。在云计算和云服务中涉及资源信息处理,需要将第一系统环境相关的资源应用于第二系统环境。例如,将测试环境下验证通过的资源应用于生产环境等。With the development of computer technology, cloud computing and cloud services have also been developed. Resource information processing is involved in cloud computing and cloud services, and resources related to the first system environment need to be applied to the second system environment. For example, applying the resources verified in the test environment to the production environment, etc.
发明内容Contents of the invention
本公开提供了一种资源信息处理方法、装置、电子设备以及存储介质。The disclosure provides a resource information processing method, device, electronic equipment and storage medium.
根据本公开的一方面,提供了一种资源信息处理方法,包括:获取第一资源配置信息和第二资源配置信息,其中,上述第一资源配置信息包括资源配置项和第一资源配置项值,上述资源配置项是与第一系统环境对应的资源配置项,上述第一资源配置项值是与第二系统环境对应的资源配置项值,与上述第一资源配置项值对应的资源配置项与上述资源配置项对应,上述第二资源配置信息包括目标资源配置项和预定占位信息,上述目标资源配置项是与上述第二系统环境对应的资源配置项,上述预定占位信息用于表征与上述目标资源配置项对应的第二资源配置项值的位置,上述资源配置项是上述目标资源配置项的至少部分;以及,基于上述第一资源配置信息对上述第二资源配置信息进行处理,得到目标资源配置信息,其中,上述目标资源配置信息是应用于上述第二系统环境的资源配置信息。According to an aspect of the present disclosure, a resource information processing method is provided, including: acquiring first resource configuration information and second resource configuration information, wherein the first resource configuration information includes resource configuration items and first resource configuration item values , the above-mentioned resource configuration item is a resource configuration item corresponding to the first system environment, the above-mentioned first resource configuration item value is a resource configuration item value corresponding to the second system environment, and the resource configuration item corresponding to the above-mentioned first resource configuration item value Corresponding to the above-mentioned resource configuration items, the above-mentioned second resource configuration information includes target resource configuration items and predetermined occupancy information, the above-mentioned target resource configuration items are resource configuration items corresponding to the above-mentioned second system environment, and the above-mentioned predetermined occupancy information is used to represent the location of the value of the second resource configuration item corresponding to the target resource configuration item, the resource configuration item being at least part of the target resource configuration item; and, processing the second resource configuration information based on the first resource configuration information, Target resource configuration information is obtained, wherein the target resource configuration information is resource configuration information applied to the second system environment.
根据本公开的另一方面,提供了一种资源信息处理装置,包括:获取模块,用于获取第一资源配置信息和第二资源配置信息,其中,上述第一资源配置信息包括资源配置项和第一资源配置项值,上述资源配置项是与第一系统环境对应的资源配置项,上述第一资源配置项值是与第二系统环境对应的资源配置项值,上述第二资源配置信息包括目标资源配置项和预定占位信息,上述目标资源配置项是与上述第二系统环境对应的资源配置项,上述预定占位信息用于表征与上述目标资源配置项对应的第二资源配置项值的位置;以及,获得模块,用于基于上述第一资源配置信息对上述第二资源配置信息进行处理,得到目标资源配置信息,其中,上述目标资源配置信息是应用于上述第二系统环境的资源配置信息。According to another aspect of the present disclosure, a resource information processing device is provided, including: an acquisition module configured to acquire first resource configuration information and second resource configuration information, wherein the first resource configuration information includes resource configuration items and The first resource configuration item value, the resource configuration item is a resource configuration item corresponding to the first system environment, the first resource configuration item value is a resource configuration item value corresponding to the second system environment, and the second resource configuration information includes The target resource configuration item and predetermined occupancy information, the above target resource configuration item is a resource configuration item corresponding to the above second system environment, and the above predetermined occupancy information is used to represent the value of the second resource configuration item corresponding to the above 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, wherein the target resource configuration information is a resource applied to the second system environment configuration information.
根据本公开的另一方面,提供了一种电子设备,包括:至少一个处理器;以及与上述至少一个处理器通信连接的存储器;其中,上述存储器存储有可被上述至少一个处理器执行的指令,上述指令被上述至少一个处理器执行,以使上述至少一个处理器能够执行如本公开所述的方法。According to another aspect of the present disclosure, an electronic device is provided, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor , the above-mentioned instructions are executed by the above-mentioned at least one processor, so that the above-mentioned at least one processor can execute the method as described in the present disclosure.
根据本公开的另一方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其中,上述计算机指令用于使上述计算机执行如本公开所述的方法。According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to make the computer execute the method as described in the present disclosure.
根据本公开的另一方面,提供了一种计算机程序产品,包括计算机程序,上述计算机程序在被处理器执行时实现如本公开所述的方法。According to another aspect of the present disclosure, there is provided a computer program product, including a computer program, which implements the method as described in the present disclosure when executed by a processor.
本公开技术方案中,通过在第二资源配置信息中设置预定占位信息,预定占位信息用于表征目标资源配置项的第二资源配置项值的位置,进而,基于第一资源配置信息对第二资源配置信息进行处理,能够得到应用于第二系统环境的目标资源配置,实现了对第二资源配置信息进行一次修改,便可以使得目标资源配置信息(至少部分)在第二系统环境一次性生效,降低了修改复杂度,提高了资源信息处理效率。In the technical solution of the present disclosure, by setting predetermined occupancy information in the second resource configuration information, the predetermined occupancy information is used to represent the position of the second resource configuration item value of the target resource configuration item, and then, based on the first resource configuration information, the The second resource configuration information is processed to obtain the target resource configuration applied to the second system environment, so that the second resource configuration information can be modified once to make the target resource configuration information (at least partially) in the second system environment once. It takes effect automatically, reduces the complexity of modification, and improves the efficiency of resource information processing.
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。It should be understood that what is described in this section is not intended to identify key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will be readily understood through the following description.
附图说明Description of drawings
附图用于更好地理解本方案,不构成对本公开的限定。其中:The accompanying drawings are used to better understand the present solution, and do not constitute a limitation to the present disclosure. in:
图1示意性示出了根据本公开实施例的可以应用资源信息处理方法及装置的示例性系统架构;FIG. 1 schematically shows an exemplary system architecture to which a resource information processing method and device can be applied according to an embodiment of the present disclosure;
图2示意性示出了根据本公开实施例的资源信息处理方法的流程图;Fig. 2 schematically shows a flowchart of a resource information processing method according to an embodiment of the present disclosure;
图3A示意性示出了根据本公开实施例的资源信息处理方法的原理示意图;FIG. 3A schematically shows a schematic diagram of the principle of a method for processing resource information according to an embodiment of the present disclosure;
图3B示意性示出了根据本公开实施例的利用处理例程处理第一资源配置信息和第二资源配置信息,得到目标资源配置信息的示例示意图;Fig. 3B schematically shows an example schematic diagram of obtaining target resource configuration information by using a processing routine to process first resource configuration information and second resource configuration information according to an embodiment of the present disclosure;
图3C示意性示出了根据本公开实施例的在检测到资源配置界面接收到第一资源配置操作的情况下,获取第一资源配置信息的示例示意图;Fig. 3C schematically shows an example schematic diagram of acquiring first resource configuration information when it is detected that the resource configuration interface receives the first resource configuration operation according to an embodiment of the present disclosure;
图3D示意性示出了根据本公开实施例的在检测到资源配置界面接收到第二资源配置操作的情况下,获取第二资源配置信息的示例示意图;Fig. 3D schematically shows an example schematic diagram of acquiring second resource configuration information when it is detected that the resource configuration interface has received a second resource configuration operation according to an embodiment of the present disclosure;
图3E示意性示出了根据本公开实施例的在确定目标资源配置项与资源配置项相匹配的情况下,将预定占位信息替换为第一资源配置项值,得到目标资源配置信息的示例示意图;Fig. 3E schematically shows an example of obtaining target resource configuration information by replacing predetermined occupancy information with the value of the first resource configuration item when it is determined that the target resource configuration item matches the resource configuration item according to an embodiment of the present disclosure schematic diagram;
图4示意性示出了根据本公开实施例的资源信息处理装置的框图;以及Fig. 4 schematically shows a block diagram of a resource information processing device according to an embodiment of the present disclosure; and
图5示意性示出了根据本公开实施例的适于实现资源信息处理方法的电子设备的框图。Fig. 5 schematically shows a block diagram of an electronic device suitable for implementing a resource information processing method according to an embodiment of the present disclosure.
具体实施方式detailed description
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and they should be regarded as exemplary only. 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 disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
由于第一系统环境和第二系统环境存在差异,因此,在将经由第一系统环境验证通过的资源的已配置资源配置信息应用于第二系统环境的情况下,需要对已配置资源配置信息进行修改,以便适用于第二系统环境。例如,第一系统环境可以包括测试环境。第二系统环境可以包括生产环境。测试环境可以指对产品进行测试的环境。生产环境(即线上环境)可以指产品正式运行的环境。Due to the differences between the first system environment and the second system environment, when applying the configured resource configuration information of the resources verified by the first system environment to the second system environment, the configured resource configuration information needs to be Modified to apply 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. The production environment (that is, the online environment) may refer to the environment in which the product is officially run.
为此,本公开实施例提出了一种资源信息处理方案。例如,获取第一资源配置信息和第二资源配置信息。第一资源配置信息可以包括资源配置项和第一资源配置项值。资源配置项可以是与第一系统环境对应的资源配置项。第一资源配置项值可以是与第二系统环境对应的资源配置项值。与第一资源配置项值对应的资源配置项可以与资源配置项对应。第二资源配置信息可以包括目标资源配置项和预定占位信息。目标资源配置项可以是与第二系统环境对应的资源配置项。预定占位信息用于表征与目标资源配置项对应的第二资源配置项值的位置。资源配置项可以是目标资源配置项的至少部分。基于第一资源配置信息对第二资源配置信息进行处理,得到目标资源配置信息。目标资源配置信息是应用于第二系统环境的资源配置信息。To this end, an embodiment of the present disclosure proposes a resource information processing solution. For example, first resource configuration information and second resource configuration information are acquired. The first resource configuration information may include resource configuration items and first resource configuration item values. The resource configuration item may be a resource configuration item corresponding to the first system environment. The first resource configuration item value may be a resource configuration item value corresponding to the second system environment. The resource configuration item corresponding to the value of the first resource configuration item may correspond to the resource configuration item. The second resource configuration information may include target resource configuration items and predetermined occupancy information. The target resource configuration item may be a resource configuration item corresponding to the second system environment. The predetermined occupancy information is used to represent the position of the value of the second resource configuration item corresponding to the target resource configuration item. The resource configuration item may be at least part of the target resource configuration item. The second resource configuration information is processed 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.
通过在第二资源配置信息中设置预定占位信息,预定占位信息用于表征目标资源配置项的第二资源配置项值的位置,进而基于第一资源配置信息对第二资源配置信息进行处理,能够得到应用于第二系统环境的目标资源配置,实现了对第二资源配置信息进行一次修改,便可以使得目标资源配置信息(至少部分)在第二系统环境一次性生效,降低了修改复杂度,提高了资源信息处理效率。By setting predetermined occupancy information in the second resource configuration information, the predetermined occupancy information is used to represent the position of the second resource configuration item value of the target resource configuration item, and then process the second resource configuration information based on the first resource configuration information , the target resource configuration applied to the second system environment can be obtained, and the second resource configuration information can be modified once, so that the target resource configuration information (at least part) can take effect in the second system environment at one time, reducing the complexity of modification It improves the efficiency of resource information processing.
图1示意性示出了根据本公开实施例的可以应用资源信息处理方法及装置的示例性系统架构。Fig. 1 schematically shows an exemplary system architecture to which a resource information processing method and device can be applied according to an embodiment of the present disclosure.
需要注意的是,图1所示仅为可以应用本公开实施例的系统架构的示例,以帮助本领域技术人员理解本公开的技术内容,但并不意味着本公开实施例不可以用于其他设备、系统、环境或场景。例如,在另一实施例中,可以应用资源信息处理方法及装置的示例性系统架构可以包括终端设备,但终端设备可以无需与服务器进行交互,即可实现本公开实施例提供的资源信息处理方法及装置。It should be noted that, what is shown in FIG. 1 is only an example of the system architecture to which the embodiments of the present disclosure can be applied, so as to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other device, system, environment or scenario. For example, in another embodiment, the exemplary system architecture to which the resource information processing method and apparatus can be applied may include a terminal device, but the terminal device may implement the resource information processing method provided by the embodiments of the present disclosure without interacting with the server. and devices.
如图1所示,根据该实施例的系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型。例如,有线通信链路和无线通信链路等中的至少之一。As shown in FIG. 1 , a
用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用。例如,知识阅读类应用、网页浏览器应用、搜索类应用、即时通信工具、邮箱客户端和社交平台软件等中的至少之一。Users can use
终端设备101、102、103可以是具有显示屏并且支持网页浏览的各种电子设备。例如,可以包括智能手机、平板电脑、膝上型便携计算机和台式计算机等中的至少之一。The
服务器105可以是提供各种服务的服务器。例如,服务器105可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决了传统物理主机与VPS服务(Virtual Private Server,虚拟专用服务器)中,存在的管理难度大,业务扩展性弱的缺陷。The
需要说明的是,本公开实施例所提供的资源信息处理方法一般可以由终端设备101、102或103执行。相应地,本公开实施例所提供的资源信息处理装置也可以设置于终端设备101、102或103中。It should be noted that, generally, the resource information processing method provided by the embodiment of the present disclosure may be executed by the
或者,本公开实施例所提供的资源信息处理方法一般也可以由服务器105执行。相应地,本公开实施例所提供的资源信息处理装置一般可以设置于服务器105中。本公开实施例所提供的资源信息处理方法也可以由不同于服务器105且能够与终端设备101、102、103和/或服务器105通信的服务器或服务器集群执行。相应地,本公开实施例所提供的资源信息处理装置也可以设置于不同于服务器105且能够与终端设备101、102、103和/或服务器105通信的服务器或服务器集群中。Or, generally, the resource information processing method provided by the embodiment of the present disclosure may also be executed by the
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in Fig. 1 are only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.
应注意,以下方法中各个操作的序号仅作为该操作的表示以便描述,而不应被看作表示该各个操作的执行顺序。除非明确指出,否则该方法不需要完全按照所示顺序来执行。It should be noted that the sequence number of each operation in the following methods is only used as a representation of the operation for description, and should not be regarded as indicating the execution order of the respective operations. The methods do not need to be performed in the exact order presented, unless explicitly stated otherwise.
图2示意性示出了根据本公开实施例的资源信息处理方法的流程图。Fig. 2 schematically shows a flowchart of a resource information processing method according to an embodiment of the present disclosure.
如图2所示,该方法200包括操作S210~S220。As shown in FIG. 2, the
在操作S210,获取第一资源配置信息和第二资源配置信息。In operation S210, first resource configuration information and second resource configuration information are acquired.
在操作S220,基于第一资源配置信息对第二资源配置信息进行处理,得到目标资源配置信息。In operation S220, the second resource configuration information is processed based on the first resource configuration information to obtain target resource configuration 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 configuration item value may be a resource configuration item value corresponding to the second system environment. The resource configuration item corresponding to the value of the first resource configuration item may correspond to the resource configuration item. The second resource configuration information may include target resource configuration items and predetermined occupancy information. The target resource configuration item may be a resource configuration item corresponding to the second system environment. The predetermined occupancy information may be used to characterize the position of the value of the second resource configuration item corresponding to the target resource configuration item. The resource configuration item may be at least part of the target resource configuration item.
根据本公开的实施例,资源配置信息可以指用于描述资源的信息。资源可以指能够被申请、分配和使用的对象。从各个维度对资源进行划分,资源可以被划分为不同类型。例如,从软件和硬件维度,资源可以包括以下至少之一:硬件资源和软件资源等。例如,硬件资源可以包括以下至少之一:CPU(Central Processing Unit,中央处理器)、GPU(GraphicsProcessing Unit,图形处理器)和内存等。CPU可以包括以下至少之一:CPU的主频、CPU的睿频、CPU的核心数、CPU的线程数、CPU的多级缓存和CPU的热设计功耗等。GPU可以包括以下至少之一:GPU的核心数、GPU的频率和GPU的容量等。内存可以包括以下至少之一:内存的大小和内存的频率等。软件资源可以包括以下至少之一:系统软件资源和应用软件资源等。系统软件资源可以包括以下至少之一:操作系统资源和支撑软件资源。从功能维度,资源可以包括以下至少之一:计算资源、存储资源和网络资源等。According to an embodiment of the present disclosure, resource configuration information may refer to information for describing resources. Resources can refer to objects that can be requested, allocated and used. Resources are divided from various dimensions, and resources can be divided into different types. For example, from the perspective of software and hardware, resources may include at least one of the following: hardware resources, software resources, and the like. For example, the hardware resource may include at least one of the following: CPU (Central Processing Unit, central processing unit), GPU (Graphics Processing Unit, graphics processing unit), memory, and the like. The CPU may include at least one of the following: main frequency of the CPU, turbo frequency of the CPU, number of cores of the CPU, number of threads of the CPU, multi-level cache of the CPU, thermal design power consumption of the CPU, and the like. The GPU may include at least one of the following: number of cores of the GPU, frequency of the GPU, capacity of the GPU, and the like. The memory may include at least one of the following: the size of the memory, the frequency of the memory, and the like. The software resources may include at least one of the following: system software resources, application software resources, and the like. The system software resources may include at least one of the following: operating system resources and supporting software resources. From a functional dimension, resources may include at least one of the following: computing resources, storage resources, and network resources.
根据本公开的实施例,可以对资源进行容器化管理,以便进行资源的部署和调度等。资源可以包括以下至少之一:Kubernetes(即K8S)资源和Docker资源。例如,K8S资源可以是私有云中的K8S资源。According to the embodiments of the present disclosure, resources can be managed in a containerized manner, so as to deploy and schedule resources, and the like. The resources may include at least one of the following: Kubernetes (that is, K8S) resources and Docker resources. For example, the K8S resource may be a K8S resource in a private cloud.
根据本公开的实施例,K8S资源可以包括以下至少之一:集群级别资源、工作负载类型资源、服务发现及负载均衡资源、配置与存储类型、特殊类型的存储卷和元数据。集群级别资源可以包括以下至少之一:Name(即名称)、Namespace(即名称空间)、Label(即标签)、Label选择器、Node(即节点)、Role(即角色)和ClusterRole(即集群角色)等。工作负载类型资源可以包括以下至少之一:Pod、ReplicaSet(即RC)、Pod控制器和DaemonSet(即守护进程集)。服务发现及负载均衡资源可以包括以下至少之一:Service(即服务)和Ingress(即入口)。配置与存储类型可以包括以下至少之一:Volume(即存储卷)和CSI(ContainerStorage Interface,容器存储接口)。特殊类型的存储卷可以包括以下至少之一:ConfigMap、Secret和DownwardAPI(Application Programming Interface,应用程序接口)。According to an embodiment of the present disclosure, K8S resources may include at least one of the following: cluster-level resources, workload type resources, service discovery and load balancing resources, configuration and storage types, special types of storage volumes, and metadata. Cluster-level resources can include at least one of the following: Name (ie name), Namespace (namespace), Label (ie label), Label selector, Node (ie node), Role (ie role) and ClusterRole (ie cluster role )Wait. The workload type resources may include at least one of the following: Pod, ReplicaSet (ie, RC), Pod controller, and DaemonSet (ie, daemon process set). The resource for service discovery and load balancing may include at least one of the following: Service (ie, service) and Ingress (ie, entry). The configuration and storage type may include at least one of the following: Volume (ie storage volume) and CSI (ContainerStorage Interface, container storage interface). The special type of storage volume may include at least one of the following: ConfigMap, Secret and DownwardAPI (Application Programming Interface, application programming interface).
根据本公开的实施例,Pod可以指K8S中最小的可部署的工作单元。Pod可以运行多个容器。Pod控制器可以指用于启动Pod的模板。Pod控制器可以包括以下至少之一:部署(即Deployment)控制器、用于管理有状态应用的Pod控制器(即StatefulSet控制器)、用于管理任务的Pod控制器(即Job控制器)和用于管理定时任务的Pod控制器(即Cronjob控制器)等。According to an embodiment of the present disclosure, a Pod may refer to the smallest deployable work unit in K8S. Pods can run multiple containers. Pod controllers can refer to templates used to start pods. Pod controllers may include at least one of the following: a deployment (i.e. Deployment) controller, a Pod controller (i.e. StatefulSet controller) for managing stateful applications, a Pod controller (i.e. Job controller) for managing tasks, and A Pod controller (that is, a Cronjob controller) for managing scheduled tasks, etc.
根据本公开的实施例,Namespace可以指能够隔离K8S中各种资源的方法。Namespace可以指K8S内部的虚拟集群组。Namespace可以包括以下至少之一:Default(即默认值)、Kube-System和Kube-public。Label可以用于分类管理资源。Label可以表征为“:key=value”。Label选择器可以用于选择预定标签。Label选择器可以包括以下至少之一:基于等值关系的Label选择器和基于集合关系的Label选择器。等值关系可以包括以下至少之一:等于和不等于。集合关系可以包括以下至少之一:属于、不属于和存在。According to an embodiment of the present disclosure, Namespace may refer to a method capable of isolating various resources in K8S. Namespace can refer to the virtual cluster group inside K8S. Namespace may include at least one of the following: Default (ie default value), Kube-System and Kube-public. Label can be used to classify and manage resources. Label can be characterized as ":key=value". The Label selector can be used to select a predetermined label. The Label selector may include at least one of the following: a Label selector based on an equivalence relationship and a Label selector based on a set relationship. The equivalence relationship may include at least one of the following: equal to and not equal to. The collection relationship may include at least one of the following: belongs to, does not belong to and exists.
根据本公开的实施例,Service可以指用于提供相同服务的Pod的对外访问接口。Service具有网络地址和端口,Service为Pod提供了负载均衡。According to an embodiment of the present disclosure, a Service may refer to an external access interface of a Pod for providing the same service. Service has a network address and port, and Service provides load balancing for Pod.
根据本公开的实施例,资源可以包括至少一个资源项。资源项可以包括以下至少之一:通用资源项和非通用资源项。通用资源项可以指具有通用性的资源项。通用性可以指在服务的至少两个位置被使用。例如,通用资源项可以包括以下至少之一:登录项和网络地址等。登录项可以包括以下至少之一:账号和密码等。网络地址可以包括以下至少之一:MAC(Media Access Control,介质访问控制)地址、IP(Internet Protocol,互联网协议)地址和端口(即Port)。非通用资源项可以指不具有通用性的资源项。资源配置信息可以包括以下至少之一:通用资源配置项信息和非通用资源配置项信息。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 the following: general resource items and non-general resource items. A generic resource item may refer to a generic resource item. Commonality may mean being used in at least two places of the service. For example, the common resource item may include at least one of the following: login item, network address, and so on. The login item may include at least one of the following: account number and password. The network address may include at least one of the following: a MAC (Media Access Control, Media Access Control) address, an IP (Internet Protocol, Internet Protocol) address, and a port (ie, Port). A non-generic resource item may refer to a resource item that is not generic. The resource configuration information may include at least one of the following: general 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 value of the first resource configuration item may correspond to the resource configuration item. The first resource configuration item value may be obtained by modifying the configured resource configuration item value according to the resource configuration item value corresponding to the resource configuration item and system environment information of the second system environment. Alternatively, the value of the first resource configuration item 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 target resource configuration items and predetermined occupancy 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 items in the first resource configuration information may be at least part of the target resource configuration items. For example, the resource configuration item in the first resource configuration information may match the target resource configuration item. Alternatively, the resource configuration items in the first resource configuration information may partially match the target resource configuration items. 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 corresponding resource configuration item in the second system environment. The number of target resource configuration items may be at least one.
根据本公开的实施例,目标资源配置信息可以是针对Kubernetes的资源配置信息和针对Docker的资源配置信息中的至少之一。第一资源配置信息、第二资源配置信息和目标资源配置信息的数据格式可以根据实际业务需求进行配置,在此不作限定。例如,数据格式可以包括YAML(即YAML Ain′t Markup Language)和JSON(Java Script ObjectNotation,JS对象简谱)。According to an embodiment of the present disclosure, the target resource configuration information may be at least one of resource configuration information for Kubernetes 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 actual service requirements, and are not limited here. For example, the data format may include YAML (that is, YAML Ain't Markup Language) and JSON (Java Script Object Notation, JS Object Notation).
根据本公开的实施例,第一资源配置信息可以存储于第一数据表。第二资源配置信息可以存储于第二数据表。第一资源配置信息可以包括与第一系统环境对应的资源配置项和与第二系统环境对应的第一资源配置项值。资源配置项可以是通用资源配置项。资源配置项可以是预定全局变量。资源配置项的数目可以是至少一个。预定全局变量可以是具有文件作用域的变量。文件作用域可以指从定义的代码行开始直至文件的末尾。资源配置项和第一资源配置项值可以是以键值对(即Key-Value)形式存在。资源配置项可以指Key。第一资源配置项值可以指Value。例如,资源配置项信息可以是“″value_name″:″1_password″,″value″:″123456″”。资源配置项可以是“1_password”。第一资源配置项值可以是“123456”。备选地,第一资源配置信息可以是“″value_name″:″1_username″,″value″:″test″”。资源配置项可以是“1_username”。第一资源配置项值可以是“test”。According to an embodiment of the present disclosure, the first resource configuration information may be stored in the first data table. The second resource configuration information can be stored in the second data table. The first resource configuration information may include resource configuration items corresponding to the first system environment and first resource configuration item values corresponding to the second system environment. The resource configuration item may be a general resource configuration item. Resource configuration items can be predetermined global variables. The number of resource configuration items may be at least one. Predetermined global variables can be variables with file scope. File scope can refer from the beginning of 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 (that is, Key-Value). A resource configuration item may refer to a Key. The first resource configuration item value may refer to Value. For example, the resource configuration item information may be ""value_name":"1_password", "value":"123456"". The resource configuration item can be "1_password". The value of the first resource configuration item may be "123456". Alternatively, the first resource configuration information may be ""value_name":"1_username", "value":"test"". The resource configuration item can be "1_username". The value of the first resource configuration item may be "test".
根据本公开的实施例,第二资源配置信息可以包括目标资源配置项和预定占位信息。预定占位信息可以与目标资源配置项一一对应。预定占位信息的格式可以根据实际业务需求进行配置,在此不作限定。例如,预定占位信息的格式可以与资源信息处理过程中涉及的其他占位信息不同。此外,如果存在多个预定占位信息,则多个预定占位信息的格式彼此不同。根据本公开的实施例,第二资源配置信息还可以包括以下至少之一:应用程序接口版本(即APIVersion)、资源类别(即Kind)、资源元数据(即Metadata)、定义清单(即Spec)和当前状态(即Status)。APIVersion可以指资源属于哪个群组和版本。资源元数据可以用于描述资源的属性信息。定义清单可以用于描述资源的预期状态。当前状态可以用于描述资源的当前状态。According to an embodiment of the present disclosure, the second resource configuration information may include target resource configuration items and predetermined occupancy information. The predetermined occupancy information may be in one-to-one correspondence with the target resource configuration item. The format of the predetermined occupancy information can be configured according to actual business requirements, and is not limited here. For example, the format of the predetermined occupancy information may be different from other occupancy information involved in resource information processing. Furthermore, if there is a plurality of predetermined placeholder information, the formats of the plurality of predetermined placeholder information are different from each other. According to an embodiment of the present disclosure, the second resource configuration information may also include at least one of the following: application program interface version (ie APIVersion), resource category (ie Kind), resource metadata (ie Metadata), definition list (ie Spec) and the current state (i.e. Status). APIVersion can refer to which group and version the resource belongs to. Resource metadata can be used to describe the attribute information of resources. A definition manifest can be used to describe the expected state of a resource. Current state can be used to describe the current state of a resource.
根据本公开的实施例,资源元数据可以包括以下至少之一:Name、NameSpace、Labels和Annotations(即注释)。Labels可以是键值数据。Annotations可以是非标识型键值数据。Annotations可以是Labels的补充。According to an embodiment of the present disclosure, resource metadata may include at least one of the following: Name, NameSpace, Labels, and Annotations (ie annotations). Labels can be key-value data. Annotations can be non-identifying key-value data. Annotations can be a supplement to Labels.
例如,第二资源配置信息可以是“password:′{{<×××>password<×××>}}′”。目标资源配置项可以是“password”。预定占位信息可以是“{{<×××>password<×××>}}”。此外,第二资源配置信息还可以包括“Metadata:name:1.conf;namespace:default”。For example, the second resource configuration information may be "password: '{{<×××>password<×××>}}'". The target resource configuration item can be "password". The predetermined occupancy information can be "{{<×××>password<×××>}}". In addition, the second resource configuration information may also include "Metadata: name: 1.conf; namespace: default".
根据本公开的实施例,获取第一资源配置信息和第二资源配置信息,可以包括:可以确定是否要对资源的应用于第一系统环境的已配置资源配置信息进行修改。在确定要对资源的已配置资源配置信息进行修改的情况下,可以获取第一资源配置信息和第二资源配置信息。在确定不需要对资源的已配置资源配置信息进行修改的情况下,结束执行资源信息处理操作。响应于要对资源的已配置资源配置信息进行修改,获取第一资源配置信息和第二资源配置信息,可以包括:在将经由第一系统环境验证通过的已配置资源配置信息应用于第二系统环境的情况下,响应于要对资源的已配置资源配置信息进行修改,获取第一资源配置信息和第二资源配置信息。第一系统环境可以包括测试环境。第二系统环境可以包括生产环境。According to an embodiment of the present disclosure, acquiring the first resource configuration information and the second resource configuration information may include: determining whether to modify the configured resource configuration information of the resource applied to the first system environment. In a case where it is determined to modify the configured resource configuration information of the resource, the first resource configuration information and the second resource configuration information may be acquired. In a case where it is determined that the configured resource configuration information of the resource does not need to be modified, the execution of the resource information processing operation ends. In response to modifying the configured resource configuration information of the resource, obtaining the first resource configuration information and the second resource configuration information may include: applying the configured resource configuration information verified by the first system environment to the second system In the case of the environment, the first resource configuration information and the second resource configuration information are acquired in response to modifying 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, obtaining the first resource configuration information and the second resource configuration information may include: obtaining the first resource configuration information and the second resource configuration information when a resource information configuration instruction for the configured resource configuration information is detected. Resource configuration information. In addition, if no resource configuration instruction for configured resource configuration information is detected, the execution of the resource information processing operation ends. The resource information configuration instruction may be an instruction for acquiring first resource configuration information and 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, a slide operation, and the like.
根据本公开的实施例,可以在确定第一资源配置信息的资源配置项与第二资源配置信息的目标资源配置项的匹配性结果满足预定匹配条件的情况下,利用第一资源配置项值对第二资源配置信息的预定占位信息进行处理,得到目标资源配置信息。预定匹配条件可以指资源配置项与目标资源配置项相匹配。According to an embodiment of the present disclosure, when it is determined that the matching result between the resource configuration item of the first resource configuration information and the target resource configuration item of the second resource configuration information satisfies a predetermined matching condition, the value pair of the first resource configuration item may be used to The predetermined occupancy information of the second resource configuration information is processed to obtain target resource configuration information. The predetermined matching condition may refer to that the resource configuration item matches the target resource configuration item.
根据本公开的实施例,通过在第二资源配置信息中设置预定占位信息,预定占位信息用于表征目标资源配置项的第二资源配置项值的位置,进而基于第一资源配置信息对第二资源配置信息进行处理,能够得到应用于第二系统环境的目标资源配置,实现了对第二资源配置信息进行一次修改,便可以使得目标资源配置信息(至少部分)在第二系统环境一次性生效,降低了修改复杂度,提高了资源信息处理效率。According to an embodiment of the present disclosure, by setting predetermined occupancy information in the second resource configuration information, the predetermined occupancy information is used to characterize the position of the second resource configuration item value of the target resource configuration item, and then based on the first resource configuration information to The second resource configuration information is processed to obtain the target resource configuration applied to the second system environment, so that the second resource configuration information can be modified once to make the target resource configuration information (at least partially) in the second system environment once. It takes effect automatically, reduces the complexity of modification, and improves the efficiency of resource information processing.
根据本公开的实施例,上述资源信息处理方法还可以包括如下操作。According to an embodiment of the present disclosure, the above resource information processing method may further include the following operations.
将资源配置项和目标资源配置项创建为预定全局变量。Create resource configuration items and target resource configuration items as predetermined global variables.
根据本公开的实施例,可以响应于检测到全局变量创建指令,将资源配置项和目标资源配置项创建为预定全局变量。According to an embodiment of the present disclosure, the resource configuration item and the target resource configuration item may be created as predetermined global variables in response to detecting the global variable creation instruction.
根据本公开的实施例,可以将目标资源配置项和第一资源配置信息中的资源配置项设置为预定函数外部的变量,使得目标资源配置项和第一资源配置信息中的资源配置项是预定全局变量。According to an embodiment of the present disclosure, the target resource configuration item and the resource configuration item in the first resource configuration information can 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 an embodiment of the present disclosure, the format of the predetermined occupancy information may be different from other occupancy information involved in the resource processing process.
根据本公开的实施例,预定占位信息的格式可以根据实际业务需求进行配置,在此不作限定。例如,预定占位信息的格式可以是根据预定符号和预定字符串确定的。预定符号可以包括以下至少之一:数字符号、数学符号和标点符号。例如,预定占位信息的格式可以是“{{<×××>××<×××>}}”。该预定占位信息的格式可以包括两个左大括号、左尖括号、项目名称、右尖括号、空格、目标资源配置项、空格、左尖括号、项目名称、右尖括号和两个右大括号。According to an embodiment of the present disclosure, the format of the predetermined occupancy information may be configured according to actual service requirements, and is not limited herein. For example, the format of the predetermined occupancy information may be determined according to predetermined symbols and predetermined character strings. The predetermined symbols may include at least one of: numerical symbols, mathematical symbols, and punctuation marks. For example, the format of the predetermined occupancy information may be "{{<×××>××<×××>}}". The format of the predetermined placeholder information may include two opening curly brackets, opening angle bracket, project name, closing angle bracket, space, target resource configuration item, space, opening angle bracket, project name, closing angle bracket and two closing brackets brackets.
例如,预定占位信息的格式可以是“{{[×××]××[×××]}}”。该预定占位信息的格式可以包括两个左大括号、左中括号、项目名称、右中括号、空格、目标资源配置项、空格、左中括号、项目名称、右中括号和两个右大括号。For example, the format of the predetermined occupancy information may be “{{[×××]××[×××]}}”. The format of the predetermined placeholder information may include two opening curly brackets, a left bracket, project name, a closing bracket, a space, a target resource configuration item, a space, a left bracket, a project name, a right bracket, and two right brackets brackets.
例如,预定占位信息的格式可以是“{{[×××]××}}”。该预定占位信息的格式可以包括两个左大括号、左中括号、项目名称、右中括号、目标资源配置项和两个右大括号。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 bracket, a project name, a right bracket, a target resource configuration item, and two right braces.
根据本公开的实施例,操作S210可以包括如下操作。According to an embodiment of the present disclosure, operation S210 may include the following operations.
在检测到针对第一系统环境的已配置资源配置信息适配指令,展示资源配置界面。在检测到资源配置界面接收到资源配置操作的情况下,获取第一资源配置信息和第二资源配置信息。When the configured resource configuration information adaptation instruction for the first system environment is detected, a resource configuration interface is displayed. When it is detected that the resource configuration interface has received a resource configuration operation, the first resource configuration information and the second resource configuration information are acquired.
根据本公开的实施例,适配指令可以用于表征将第一系统环境的已配置资源配置信息适配第二系统环境的指令。According to an embodiment of the present disclosure, the adaptation instruction may be used to represent an instruction for adapting 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 may include at least one resource configuration control. For example, the resource configuration control may include at least one of the following: a selection operation control, an input operation control, an insertion operation control, an import operation control, a confirmation operation control, a cancel 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, in response to detecting an adaptation instruction for configured resource configuration information of the first system environment, a resource configuration interface is displayed. In response to detecting that the resource configuration interface receives a resource configuration operation, first resource configuration information and second resource configuration information are acquired.
根据本公开的实施例,通过在检测到针对第一系统环境的已配置资源配置信息的适配指令,展示资源配置界面,实现了为资源信息处理操作提供可视化界面支持,便于资源信息处理操作。According to the embodiment of the present disclosure, by displaying the resource configuration interface after detecting the adaptation instruction for the configured resource configuration information of the first system environment, it is realized to provide visual interface support for the resource information processing operation, which facilitates the resource information processing 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, when it is detected that the resource configuration interface has received a resource configuration operation, obtaining the first resource configuration information and the second resource configuration information may include the following operations.
在检测到资源配置界面接收到第一资源配置操作的情况下,获取第一资源配置信息。在检测到资源配置界面接收到第二资源配置操作的情况下,获取第二资源配置信息。When it is detected that the resource configuration interface receives the first resource configuration operation, the first resource configuration information is acquired. When it is detected that the resource configuration interface receives the second resource configuration operation, the second resource configuration information is acquired.
根据本公开的实施例,第一资源配置操作可以指与第一资源配置信息对应的资源配置操作。例如,第一资源配置操作可以包括资源选择操作和资源输入操作。第二资源配置操作可以指与第二资源配置信息对应的资源配置操作。例如,第二资源配置操作可以包括资源插入操作和资源输入操作。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 an embodiment of the present disclosure, when 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.
在检测到资源配置界面接收到资源插入操作的情况下,获取目标插入位置。在检测到目标插入位置接收到资源输入操作的情况下,获取第二资源配置信息。When it is detected that the resource configuration interface has received a resource insertion operation, the target insertion position is acquired. When it is detected that a resource input operation is received at the target insertion position, second resource configuration information is acquired.
根据本公开的实施例,目标插入位置可以指用于插入第二资源配置信息的位置。资源插入操作可以指用于确定第二资源配置信息的位置的操作。资源插入操作可以包括点击操作和选择操作中的之一。资源输入操作可以指用于获取第二资源配置信息的操作。资源输入操作可以包括选择操作和输入操作中的之一。According to an embodiment of the present disclosure, the target insertion location may refer to a location for inserting the second resource configuration information. The resource insertion operation may refer to an operation for determining the 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 obtaining configuration information of the second resource. The resource input operation may include one of a selection operation and an input operation.
根据本公开的实施例,操作S220可以包括如下操作。According to an embodiment of the present disclosure, operation S220 may include the following operations.
调用处理例程。利用处理例程,并基于第一资源配置信息,对第二资源配置信息进行处理,得到目标资源配置信息。Call the handler. Using the processing routine and based on the first resource configuration information, the second resource configuration information is processed 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 by using the first resource configuration information. The processing routine may include processing logic of how to use the first resource configuration information to process the second resource configuration information to obtain target resource configuration information.
根据本公开的实施例,处理例程的模板语言可以根据实际业务需求进行配置,在此不作限定。例如,模板语言可以包括以下至少之一:Jinja2和Django。处理例程可以包括Template().render()。According to the embodiment of the present disclosure, the template language of the processing routine can be configured according to actual business requirements, which is not limited here. For example, the template language may include at least one of the following: Jinja2 and Django. Processing routines may include Template().render().
例如,处理例程可以是Jinja2.Template().render()例程。Jinja2.Template().render()的输入参数可以包括第一资源配置信息和第二资源配置信息,输出结果可以是目标资源配置信息。For example, the processing routine could be the Jinja2.Template().render() routine. The input parameters of Jinja2.Template().render() may include first resource configuration information and second resource configuration information, and the output result may be target resource configuration information.
根据本公开的实施例,由于第二资源配置信息包括预定占位信息,预定占位信息用于表征目标资源配置项的第二资源配置项值的位置,因此,利用处理例程处理第一资源配置信息和第二资源配置信息,得到应用于第二系统环境的目标资源配置信息,实现了对第二资源配置信息进行一次修改,便可以使得应用于第二系统环境的目标资源配置信息(至少部分)一次性生效,降低了修改复杂度,提高了资源处理效率。According to an embodiment of the present disclosure, since the second resource configuration information includes predetermined occupancy information, and the predetermined occupancy information is used to characterize the position of the second resource configuration item value of the target resource configuration item, the first resource is processed using the processing routine The configuration information and the second resource configuration information are used to obtain the target resource configuration information applied to the second system environment, so that the second resource configuration information can be modified once so that the target resource configuration information (at least part) take effect at one time, reducing the modification complexity and improving resource processing efficiency.
根据本公开的实施例,目标资源配置项可以是预定全局变量。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, using a processing routine to process the second resource configuration information based on the first resource configuration information to obtain target resource configuration information may include the following operations.
在确定目标资源配置项与资源配置项相匹配的情况下,将预定占位信息替换为第一资源配置项值,得到目标资源配置信息。When it is determined that the target resource configuration item matches the resource configuration item, the predetermined occupancy information is replaced with the value of the first resource configuration item to obtain the 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 matching the target resource configuration item with the resource configuration item. It can be determined whether the target resource configuration item matches the resource configuration item. If it is determined that the target resource configuration item matches the resource configuration item, the value of the first resource configuration item of the resource configuration item may be used to replace the predetermined occupancy information in the second resource configuration information to obtain the target resource configuration information. If it is determined that the target resource configuration item does not match the resource configuration item, it may not be necessary to replace the predetermined occupancy information in the second resource configuration information with the value of the first resource configuration item, thereby obtaining a replacement failure result representing a replacement failure. For example, the operation of replacing the predetermined occupancy information with the value of the first resource configuration item to obtain the target resource configuration information may end. In addition, the predetermined occupancy information may be replaced with the value of the first resource configuration item manually.
例如,第一资源配置信息可以包括资源配置项“password”和第一资源配置项值“123456”。第二资源配置信息可以包括目标资源配置项“password”和预定占位信息“{{<×××>password<×××>}}”。目标资源配置项“password”是预定全局变量。For example, the first resource configuration information may include a resource configuration item "password" and a first resource configuration item value "123456". The second resource configuration information may include a target resource configuration item "password" and predetermined occupancy information "{{<×××>password<×××>}}". The target resource configuration item "password" is a predetermined global variable.
由于目标资源配置项“password”与资源配置项“password”相匹配,因此,可以将第二资源配置信息中的预定占位信息“{{<×××>password<×××>}}”替换为第一资源配置项值“123456”,得到包括目标资源配置项“password”和第一资源配置项值“123456”的目标资源配置信息,例如,目标资源配置信息“password:′123456′”。第二资源配置项值与第一资源配置项值相等。Since the target resource configuration item "password" matches the resource configuration item "password", the predetermined occupancy information "{{<×××>password<×××>}}" in the second resource configuration information can be Replace it with the first resource configuration item value "123456", and obtain the target resource configuration information including the target resource configuration item "password" and the first resource configuration item value "123456", for example, the target resource configuration information "password:'123456'" . The value of the second resource configuration item is equal to the value of the first resource configuration item.
根据本公开的实施例,由于预定占位信息包括预定全局变量,第二资源配置信息包括预定占位信息,因此,在确定目标资源配置项与资源配置项相匹配的情况下,将第二资源配置信息中的预定占位信息替换为资源配置项第一资源配置项值,得到目标资源配置信息,实现了对第二资源配置信息进行一次修改,便可以使得应用于第二系统环境的目标资源配置信息(至少部分)一次性生效,降低了修改复杂度,提高了资源处理效率。According to an embodiment of the present disclosure, since the predetermined occupancy information includes predetermined global variables, and the second resource configuration information includes predetermined occupancy information, when it is determined that the target resource configuration item matches the resource configuration item, the second resource The predetermined occupancy information in the configuration information is replaced with the value of the first resource configuration item of the resource configuration item, and the target resource configuration information is obtained, and the second resource configuration information is modified once, so that the target resource applied to the second system environment can be The configuration information (at least partially) takes effect at one time, which reduces modification complexity and improves resource processing efficiency.
根据本公开的实施例,上述资源信息处理方法还可以包括如下操作。According to an embodiment of the present disclosure, the above resource information processing method may further include the following operations.
确定占位信息替换策略。根据占位信息替换策略,创建处理例程。Determine the placeholder information replacement strategy. Create a processing routine based on the occupancy information replacement strategy.
根据本公开的实施例,占位信息替换策略可以指如何基于第一资源配置信息对第二资源配置信息进行处理得到目标资源配置信息的策略。例如,占位信息替换策略可以包括将第二资源配置信息中的预定占位信息替换为第一资源配置项值的策略。According to an embodiment of the present disclosure, the occupancy information replacement policy may refer to a policy of how to process the second resource configuration information based on the first resource configuration information to obtain target resource configuration information. For example, the occupancy information replacement policy may include a policy of replacing predetermined occupancy information in the second resource configuration information with the value of the first resource configuration item.
根据本公开的实施例,占位信息替换策略可以是根据占据配置信息确定的。占位配置信息可以包括预定占位信息替换条件和预定占位信息格式。此外,占位配置信息还可以包括以下至少之一:预定占位信息标识和预定占位信息作用域。预定占位信息替换条件可以指需要在满足何种条件的情况下,执行占位信息替换操作。预定占位信息格式可以指预定占位信息的格式。预定占位信息标识可以用于表征预定占位信息。预定占位信息作用域可以表征预定占位信息的应用范围。According to an embodiment of the present disclosure, the occupancy information replacement policy may be determined according to occupancy configuration information. The occupancy configuration information may include a predetermined occupancy information replacement condition and a predetermined occupancy information format. In addition, the occupancy configuration information may further include at least one of the following: a predetermined occupancy information identifier and a predetermined occupancy information scope. The pre-determined occupancy information replacement condition may refer to the conditions under which the occupancy information replacement operation needs to be performed. The predetermined occupancy information format may refer to the format of the predetermined occupancy information. The predetermined occupancy information identifier can be used to characterize the predetermined occupancy information. The predetermined occupancy information scope may represent the application range of the predetermined occupancy information.
根据本公开的实施例,可以根据占位信息替换策略来创建处理例程,以便处理例程能够基于第一资源配置信息对第二资源配置信息进行处理,得到目标资源配置信息。According to an embodiment of the present disclosure, a processing routine may be created according to an occupancy information replacement policy, so that the processing routine can process the second resource configuration information based on the first resource configuration information to obtain target resource configuration information.
根据本公开的实施例,上述资源信息处理方法还可以包括如下操作。According to an embodiment of the present disclosure, the above resource information processing method may further include the following operations.
在检测到资源创建指令的情况下,根据目标资源配置信息,创建用于第二系统环境的目标资源。When the resource creation instruction is detected, the target resource for the second system environment is created 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 when it is detected that a resource creation operation is triggered.
根据本公开的实施例,在检测到资源创建指令的情况下,可以利用HTTP(HyperText Transfer Protocol,超文本传输协议)接口和Client指令中的至少之一来创建用于第二系统环境的目标资源。According to an embodiment of the present disclosure, when a resource creation instruction is detected, at least one of an HTTP (HyperText Transfer Protocol, hypertext transfer protocol) interface and a Client instruction can be used to create a target resource for the second system environment .
根据本公开的实施例,根据目标资源配置信息,创建用于第二系统环境的目标资源,可以包括如下操作。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.
调用资源创建例程。利用资源创建例程处理目标资源配置信息,以创建用于第二系统环境的目标资源。Call the resource creation routine. The target resource configuration information is processed using a resource creation routine to create target resources for the second system environment.
根据本公开的实施例,资源创建例程可以指用于创建目标资源的例程。例如,资源创建例程可以指与HTTP(Hyper Text Transfer Protocol,超文本传输协议)接口相关的创建例程和与Client指令相关的创建例程中的至少之一。According to an embodiment 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, hypertext transfer protocol) interface and a creation routine related to a Client instruction.
下面参考图3A~图3E,结合具体实施例对根据本公开实施例所述的资源信息处理方法做进一步说明。Referring to FIG. 3A to FIG. 3E , the method for processing resource information according to the embodiments of the present disclosure will be further described in conjunction with specific embodiments.
图3A示意性示出了根据本公开实施例的资源信息处理方法的原理示意图。Fig. 3A schematically shows a schematic diagram of a method for processing resource information according to an embodiment of the present disclosure.
如图3A所示,在300A中,响应于要对资源的已配置资源配置信息进行修改,在检测到针对已配置资源配置信息的适配指令301的情况下,展示资源配置界面302。在检测到资源配置界面302接收到资源配置操作的情况下,获取原始资源配置信息303。原始资源配置信息303可以包括第一资源配置信息303_1和第二资源配置信息303_2。调用处理例程304。利用处理例程304处理第一资源配置信息303_1和第二资源配置信息303_2,得到目标资源配置信息305。在检测到资源创建指令的情况下,根据目标资源配置信息305,创建用于生产环境的目标资源306。As shown in FIG. 3A , in 300A, in response to modifying the configured resource configuration information of the resource, when an
图3B示意性示出了根据本公开实施例的利用处理例程处理第一资源配置信息和第二资源配置信息,得到目标资源配置信息的示例示意图。Fig. 3B schematically shows an example diagram of obtaining target resource configuration information by using a processing routine to process first resource configuration information and second resource configuration information according to an embodiment of the present disclosure.
如图3B所示,在300B中,第一资源配置信息307可以包括资源配置项307_1和第一资源配置项值307_2。第二资源配置信息308可以包括目标资源配置项308_1和预定占位信息308_2。预定占位信息308_2可以包括目标资源配置项308_1。As shown in FIG. 3B , in 300B, the first
在确定目标资源配置项308_1与资源配置项307_1相匹配的情况下,将预定占位信息308_2替换为第一资源配置项值307_2,得到目标资源配置信息309。目标资源配置信息309可以包括目标资源配置项308_1和第一资源配置项值307_2。第二资源配置项值与第一资源配置项值307_2相等。When it is determined that the target resource configuration item 308_1 matches the resource configuration item 307_1 , the predetermined occupancy information 308_2 is replaced with the first resource configuration item value 307_2 to obtain the target
图3C示意性示出了根据本公开实施例的在检测到资源配置界面接收到第一资源配置操作的情况下,获取第一资源配置信息的示例示意图。Fig. 3C schematically shows an example schematic diagram of acquiring first resource configuration information in a case where it is detected that a resource configuration interface has received a first resource configuration operation according to an embodiment of the present disclosure.
如图3C所示,在300C中,在资源配置界面310中设置第一资源配置信息310_1。资源配置界面310可以包括用于配置第一资源配置信息310_1的区域、确定控件310_2和取消控件310_3。As shown in FIG. 3C , in 300C, first resource configuration information 310_1 is set in the
响应于检测到在资源配置界面310的资源输入操作被触发的情况下,获取第一资源配置信息310_1。第一资源配置信息310_1可以包括资源配置项310_1_1和第一资源配置项值310_1_2。资源配置项310_1_1为“aa”。第一资源配置项值310_1_2为“11”。在完成第一资源配置信息310_1的第一资源配置操作之后,可以点击确定控件310_2,以实现保存。In response to detecting that a resource input operation on the
图3D示意性示出了根据本公开实施例的在检测到资源配置界面接收到第二资源配置操作的情况下,获取第二资源配置信息的示例示意图。Fig. 3D schematically shows an example schematic diagram of acquiring second resource configuration information in a case where it is detected that the resource configuration interface has received a second resource configuration operation according to an embodiment of the present disclosure.
如图3D所示,在300D中,在资源配置界面310中设置第二资源配置信息310_4。资源配置界面310可以包括用于配置第二资源配置信息310_4的区域、确定控件310_2和取消控件310_3。As shown in FIG. 3D , in 300D, second resource configuration information 310_4 is set in the
响应于检测到在资源配置界面310的资源插入操作和资源输入操作被触发的情况下,获取第二资源配置信息310_4。第二资源配置信息310_4可以包括目标资源配置项310_4_1和预定占位信息310_4_2。目标资源配置项310_4_1为“aa”。预定占位信息310_4_2为“{{<××>aa<××>}}”。预定占位信息310_4_2可以包括目标资源配置项310_4_1。。在完成第二资源配置信息310_4的第二资源配置操作之后,可以点击确定控件310_2,以实现保存。The second resource configuration information 310_4 is acquired in response to detecting that a resource insertion operation and a resource input operation on the
图3E示意性示出了根据本公开实施例的在确定目标资源配置项与资源配置项相匹配的情况下,将预定占位信息替换为第一资源配置项值,得到目标资源配置信息的示例示意图。Fig. 3E schematically shows an example of obtaining target resource configuration information by replacing predetermined occupancy information with the value of the first resource configuration item when it is determined that the target resource configuration item matches the resource configuration item according to an embodiment of the present disclosure schematic diagram.
如图3E所示,在300E中,在资源配置界面310中获得目标资源配置信息310_1。资源配置界面310可以包括用于展示目标资源配置信息310_5的区域、确定控件310_2和取消控件310_3。As shown in FIG. 3E , in 300E, target resource configuration information 310_1 is obtained on the
由于目标资源配置项310_4_1“aa”与资源配置项310_1_1“aa”相匹配,因此,可以将预定占位信息310_4_2“{{<××>aa<××>}}”替换为第一资源配置项值310_1_2“11”,得到包括目标资源配置项310_4_1“aa”和第一资源配置项值310_1_2“11”的目标资源配置信息310_5。目标资源配置信息310_5为“aa:′11′”。在确认目标资源配置信息310_5正确之后,可以点击确定控件310_2,以实现保存。Since the target resource configuration item 310_4_1 "aa" matches the resource configuration item 310_1_1 "aa", the predetermined occupancy information 310_4_2 "{{<××>aa<××>}}" can be replaced with the first resource configuration The item value 310_1_2 is "11", and the target resource configuration information 310_5 including the target resource configuration item 310_4_1 "aa" and the first resource configuration item value 310_1_2 "11" is obtained. The target resource configuration information 310_5 is "aa: '11'". After confirming that the target resource configuration information 310_5 is correct, the OK control 310_2 can be clicked to realize saving.
本公开的技术方案中,所涉及的用户个人信息的收集、存储、使用、加工、传输、提供和公开等处理,均符合相关法律法规的规定,且不违背公序良俗。In the technical solution of this disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved are all in compliance with relevant laws and regulations, and do not violate public order and good customs.
以上仅是示例性实施例,但不限于此,还可以包括本领域已知的其他资源信息处理方法,只要能够降低资源配置信息的修改复杂度,提高资源处理效率即可。The above are only exemplary embodiments, but are not limited thereto, and may also include other resource information processing methods known in the art, as long as the complexity of modifying resource configuration information can be reduced and resource processing efficiency can be improved.
图4示意性示出了根据本公开实施例的资源信息处理装置的框图。Fig. 4 schematically shows a block diagram of a resource information processing device according to an embodiment of the present disclosure.
如图4所示,资源信息处理装置400可以包括获取模块410和获得模块420。As shown in FIG. 4 , the resource
获取模块410,用于获取第一资源配置信息和第二资源配置信息。第一资源配置信息包括资源配置项和第一资源配置项值。资源配置项是与第一系统环境对应的资源配置项。第一资源配置项值是与第二系统环境对应的资源配置项值。与第一资源配置项值对应的资源配置项与资源配置项对应。第二资源配置信息包括目标资源配置项和预定占位信息。目标资源配置项是与第二系统环境对应的资源配置项。预定占位信息用于表征与目标资源配置项对应的第二资源配置项值的位置。资源配置项是目标资源配置项的至少部分。An acquiring
获得模块420,用于基于第一资源配置信息对第二资源配置信息进行处理,得到目标资源配置信息。目标资源配置信息是应用于第二系统环境的资源配置信息。The obtaining
根据本公开的实施例,获得模块420可以包括第一调用子模块第一获得子模块。According to an embodiment of the present disclosure, the obtaining
第一调用子模块,用于调用处理例程。The first calling submodule is used to call the processing routine.
第一获得子模块,用于利用处理例程,并基于第一资源配置信息,对第二资源配置信息进行处理,得到目标资源配置信息。The first obtaining sub-module is configured to use a processing routine to process the second resource configuration information 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 submodule may include an obtaining unit.
获得单元,用于在确定目标资源配置项与资源配置项相匹配的情况下,将预定占位信息替换为第一资源配置项值,得到目标资源配置信息。The obtaining unit is configured to replace the predetermined occupancy information with the value of the first resource configuration item to obtain the target resource configuration information when it is determined that the target resource configuration item matches the resource configuration item.
根据本公开的实施例,上述资源信息处理装置400还可以包括确定模块和第一创建模块。According to an embodiment of the present disclosure, the resource
确定模块,用于确定占位信息替换策略。A determining module, configured to determine a placeholder information replacement strategy.
第一创建模块,用于根据占位信息替换策略,创建处理例程。The first creation module is used to replace the policy according to the occupancy information and create a processing routine.
根据本公开的实施例,获取模块410可以包括展示子模块和获取子模块。According to an embodiment of the present disclosure, the
展示子模块,用于在检测到针对已配置资源配置信息的适配指令的情况下,展示资源配置界面。The display sub-module is used to display the resource configuration interface when an adaptation instruction for configured resource configuration information is detected.
获取子模块,用于在检测到资源配置界面接收到资源配置操作的情况下,获取第一资源配置信息和第二资源配置信息。The acquisition sub-module is configured to acquire the first resource configuration information and the second resource configuration information when it is detected that the resource configuration interface has received a 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 display submodule may include a first acquisition unit and a second acquisition unit.
第一获取单元,用于在检测到资源配置界面接收到第一资源配置操作的情况下,获取第一资源配置信息。The first obtaining unit is configured to obtain the first resource configuration information when detecting that the resource configuration interface has received the first resource configuration operation.
第二获取单元,用于在检测到资源配置界面接收到第二资源配置操作的情况下,获取第二资源配置信息。The second obtaining unit is configured to obtain the second resource configuration information when it is detected that the resource configuration interface has received 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 obtain the target insertion position when it is detected that the resource configuration interface has received a resource insertion operation.
第二获取子单元,用于在检测到目标插入位置接收到资源输入操作的情况下,获取第二资源配置信息。The second acquiring subunit is configured to acquire second resource configuration information when it is detected that a resource input operation is received at the target insertion position.
根据本公开的实施例,上述资源信息处理装置400还可以包括第二创建模块。According to an embodiment of the present disclosure, the resource
第二创建模块,用于在检测到资源创建指令的情况下,根据目标资源配置信息,创建用于第二系统环境的目标资源。The second creation module is configured to create the target resource for the second system environment according to the target resource configuration information when the resource creation instruction is detected.
根据本公开的实施例,第二创建模块可以包括第二调用子模块和创建子模块。According to an embodiment of the present disclosure, the second creation module may include a second calling submodule and a creation submodule.
第二调用子模块,用于调用资源创建例程。The second calling submodule is used to call the resource creation routine.
创建子模块,用于利用资源创建例程处理目标资源配置信息,以创建用于第二系统环境的目标资源。A submodule is created for processing target resource configuration information with a resource creation routine to create target resources for the second system environment.
根据本公开的实施例,预定占位信息的格式与资源处理过程中涉及的其他占位信息不同。According to an embodiment of the present disclosure, the format of the predetermined occupancy information is different from other occupancy information involved in the resource processing process.
根据本公开的实施例,目标资源配置信息是针对Kubernetes的资源配置信息。According to an embodiment of the present disclosure, the target resource configuration information is resource configuration information for Kubernetes.
根据本公开的实施例,本公开还提供了一种电子设备、一种可读存储介质和一种计算机程序产品。According to the embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
根据本公开的实施例,一种电子设备,包括:至少一个处理器;以及与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行如上所述的方法。According to an embodiment of the present disclosure, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by at least one processor, and the instructions are processed by at least one The processor is executed, so that at least one processor can perform the method as described above.
根据本公开的实施例,一种存储有计算机指令的非瞬时计算机可读存储介质,其中,计算机指令用于使计算机执行如上所述的方法。According to an embodiment of the present disclosure, there is a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method as described above.
根据本公开的实施例,一种计算机程序产品,包括计算机程序,计算机程序在被处理器执行时实现如上所述的方法。According to an embodiment of the present disclosure, a computer program product includes a computer program, and the computer program implements the above method when executed by a processor.
图5示意性示出了根据本公开实施例的适于实现资源信息处理方法的电子设备的框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。Fig. 5 schematically shows a block diagram of an electronic device suitable for implementing a resource information processing method according to an embodiment of the present disclosure. Electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
如图5所示,电子设备500包括计算单元501,其可以根据存储在只读存储器(ROM)502中的计算机程序或者从存储单元508加载到随机访问存储器(RAM)503中的计算机程序,来执行各种适当的动作和处理。在RAM 503中,还可存储电子设备500操作所需的各种程序和数据。计算单元501、ROM 502以及RAM 503通过总线504彼此相连。输入/输出(I/O)接口505也连接至总线504。As shown in FIG. 5 , an
电子设备500中的多个部件连接至I/O接口505,包括:输入单元506,例如键盘、鼠标等;输出单元507,例如各种类型的显示器、扬声器等;存储单元508,例如磁盘、光盘等;以及通信单元509,例如网卡、调制解调器、无线通信收发机等。通信单元509允许电子设备500通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Multiple components in the
计算单元501可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元501的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元501执行上文所描述的各个方法和处理,例如资源信息处理方法。例如,在一些实施例中,资源信息处理方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元508。在一些实施例中,计算机程序的部分或者全部可以经由ROM 502和/或通信单元509而被载入和/或安装到电子设备500上。当计算机程序加载到RAM 503并由计算单元501执行时,可以执行上文描述的资源信息处理方法的一个或多个步骤。备选地,在其他实施例中,计算单元501可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行资源信息处理方法。The
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、复杂可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips Implemented in a system of systems (SOC), complex programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpreted on a programmable system including at least one programmable processor, the programmable processor Can be special-purpose or general-purpose programmable processor, can receive data and instruction from storage system, at least one input device, and at least one output device, and transmit data and instruction to this storage system, this at least one input device, and this at least one output device an output device.
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Program codes 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, a special purpose computer, or other programmable data processing devices, so that the program codes, when executed by the processor or controller, make the functions/functions specified in the flow diagrams and/or block diagrams Action is implemented. 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.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A 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, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide for interaction with the user, the systems and techniques described herein can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user. ); and a keyboard and pointing device (eg, a mouse or a trackball) through which a user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Acoustic input, speech input or, tactile input) to receive input from the user.
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., as a a user computer having a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system. The components of the system can be interconnected by any form or medium of digital data communication, eg, a communication network. Examples of communication networks include: Local Area Network (LAN), Wide Area Network (WAN) and the Internet.
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,也可以是分布式系统的服务器,或者是结合了区块链的服务器。A computer system may include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。It should be understood that steps may be reordered, added or deleted using the various forms of flow shown above. For example, each step described in the present disclosure may be executed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in the present disclosure can be achieved, no limitation is imposed herein.
上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。The specific implementation manners described above do not limit the protection scope of the present disclosure. It should be apparent to those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present disclosure shall be included within the protection scope of the present disclosure.
Claims (25)
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) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116886682A (en) * | 2023-06-20 | 2023-10-13 | 度小满科技(北京)有限公司 | Data forwarding method, device, storage medium and electronic equipment |
-
2022
- 2022-09-30 CN CN202211219779.7A patent/CN115480922A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116886682A (en) * | 2023-06-20 | 2023-10-13 | 度小满科技(北京)有限公司 | Data forwarding method, device, storage medium and electronic equipment |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10346143B2 (en) | Systems and methods for transforming service definitions in a multi-service containerized application | |
| CN111694857B (en) | Methods, devices, electronic equipment and computer-readable media for storing resource data | |
| CN113645071B (en) | Cluster deployment method, system, medium and electronic terminal | |
| CN111639027B (en) | Test method and device and electronic equipment | |
| CN112015468B (en) | Interface document processing method and device, electronic equipment and storage medium | |
| WO2021023149A1 (en) | Method and apparatus for dynamically returning message | |
| US20200293310A1 (en) | Software development tool integration and monitoring | |
| US20220311662A1 (en) | Network configuring method for cloud mobile phone, device and storage medium | |
| CN118467637B (en) | Database synchronization system, method, device, electronic device and medium | |
| WO2023221416A1 (en) | Information generation method and apparatus, and device and storage medium | |
| WO2021120180A1 (en) | Virtual workspace experience visualization and optimization | |
| CN113641388A (en) | Cloud mobile phone update method, related device and computer program product | |
| CN112052152A (en) | A method and device for simulating testing | |
| CN114389969B (en) | Client testing method, device, electronic device and storage medium | |
| CN116341663A (en) | Extension method, device, equipment and medium of deep learning reasoning framework | |
| CN112817992B (en) | Method, device, electronic device and readable storage medium for performing modification tasks | |
| CN113691403A (en) | Topological node configuration method, related device and computer program product | |
| CN115480922A (en) | Resource information processing method, device, electronic equipment and storage medium | |
| CN115309730A (en) | Data auditing method, device, electronic device and storage medium | |
| CN111708582B (en) | On-line configuration method, device, electronic device | |
| CN114896244A (en) | Method, apparatus, apparatus, and computer-readable medium for configuring database tables | |
| CN112084000A (en) | Test method and device for container cluster | |
| CN112069071A (en) | Method and device for determining program suitability | |
| CN114218313B (en) | Data management method, device, electronic device, storage medium and product | |
| CN113986661B (en) | Log output method, device, electronic device 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 |
