WO2021212661A1 - 运行系统构建方法、装置、电子设备及存储介质 - Google Patents

运行系统构建方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2021212661A1
WO2021212661A1 PCT/CN2020/099312 CN2020099312W WO2021212661A1 WO 2021212661 A1 WO2021212661 A1 WO 2021212661A1 CN 2020099312 W CN2020099312 W CN 2020099312W WO 2021212661 A1 WO2021212661 A1 WO 2021212661A1
Authority
WO
WIPO (PCT)
Prior art keywords
parameter
resource
custom
target parameter
target
Prior art date
Application number
PCT/CN2020/099312
Other languages
English (en)
French (fr)
Inventor
于亚军
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021212661A1 publication Critical patent/WO2021212661A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Definitions

  • This application relates to the field of artificial intelligence technology, and in particular to a method, device, electronic device, and storage medium for constructing an operating system.
  • the first aspect of the present application provides a method for constructing an operating system, the method including:
  • check algorithm to check the target parameter and the custom parameter to obtain a check result, where the check algorithm includes an integrity check algorithm, a validity check algorithm, and a dependency check algorithm ;
  • an operating system is constructed.
  • a second aspect of the present application provides an electronic device including a processor and a memory, and the processor is configured to execute computer-readable instructions stored in the memory to implement the following steps:
  • check algorithm to check the target parameter and the custom parameter to obtain a check result, where the check algorithm includes an integrity check algorithm, a validity check algorithm, and a dependency check algorithm ;
  • an operating system is constructed.
  • a third aspect of the present application provides a computer-readable storage medium having at least one computer-readable instruction stored thereon, and the at least one computer-readable instruction is executed by a processor to implement the following steps:
  • check algorithm to check the target parameter and the custom parameter to obtain a check result, where the check algorithm includes an integrity check algorithm, a validity check algorithm, and a dependency check algorithm ;
  • an operating system is constructed.
  • the fourth aspect of the present application provides an operating system construction device, the device including:
  • the obtaining module is used to obtain a list of available resource parameters through associated queries
  • a receiving module configured to receive the target parameter selected by the user from the list of available resource parameters and the user-defined parameter input by the user;
  • the verification module is configured to use a verification algorithm to verify the target parameter and the custom parameter to obtain a verification result, wherein the verification algorithm includes an integrity verification algorithm and a validity verification algorithm And dependency check algorithm;
  • a generating module configured to generate a resource template according to the target parameter and the custom parameter if the verification result indicates that the target parameter and the custom parameter are correct;
  • the construction module is used to construct an operating system according to the resource stack.
  • the latest available resource parameter list can be obtained for the user to choose through the associated query, which can reduce the user’s input of invalid resource parameters.
  • the resource parameters are verified to feed back the cause of the error to the user, avoid the user from entering invalid resource parameters again, and improve the success rate of resource creation, thereby improving the construction efficiency of the system.
  • Fig. 1 is a flowchart of a preferred embodiment of a method for constructing an operating system disclosed in the present application.
  • Fig. 2 is a functional module diagram of a preferred embodiment of an operating system construction device disclosed in the present application.
  • FIG. 3 is a schematic structural diagram of an electronic device implementing a preferred embodiment of the method for constructing an operating system according to the present application.
  • the operating system construction method of the embodiment of the present application is applied to an electronic device, and can also be applied to a hardware environment composed of an electronic device and a server connected to the electronic device via a network, and is executed by the server and the electronic device.
  • Networks include, but are not limited to: wide area networks, metropolitan area networks, or local area networks.
  • FIG. 1 is a flowchart of a preferred embodiment of a method for constructing an operating system disclosed in the present application. Among them, according to different needs, the order of the steps in the flowchart can be changed, and some steps can be omitted.
  • the execution subject of the operating system construction method may be an electronic device.
  • the associated query may be to query all resources, obtain available resources, and query various parameters associated with these available resources.
  • the available resource parameter list is the resource parameter of the currently idle resource.
  • all parameters in the available resource parameter list can be output (displayed), and the user can select and input the parameters he wants according to all the parameters in the available resource parameter list.
  • the verification result is used to indicate whether the target parameter and the custom parameter are correct and the reason for the error.
  • the target parameter and the type, value range, and length of the custom parameter can be verified.
  • the length of the subnet mask is limited to 22 to 26.
  • the use of a verification algorithm to verify the target parameter and the custom parameter, and obtain the verification result includes:
  • a resource may have multiple parameters, and it is necessary to ensure that the parameters of various resources conform to specifications and are complete.
  • There may be a dependency relationship between different resources. It is necessary to determine whether the dependency input by the user is correct. You can confirm whether the resource of the dependency relationship exists. If it exists, determine the dependency relationship is correct. If the resource of the dependency relationship cannot be found, determine the dependency relationship is incorrect.
  • the network resource depends on the network segment resource (vpc), and the output identification parameter (uuid) created by the network segment resource can be used as an input parameter and passed to the network resource as the network segment identifier (vpcId) and saved as an attribute parameter.
  • an integrity check algorithm to determine whether the target parameter and the custom parameter are complete includes:
  • the first resource definition block it is judged whether there is a first missing parameter in the target parameter, and according to the second resource definition block, it is judged whether there is a second missing parameter in the custom parameter, wherein, the The first missing parameter does not have a corresponding parameter definition in the first resource definition block, and the second missing parameter does not have a corresponding parameter definition in the second resource definition block;
  • the target parameter and the custom parameter are complete.
  • the resource block can be all parameter definitions of a certain type of resource.
  • the parameters of a certain type of resource input by the user can be checked one by one to ensure that the parameters input by the user are complete.
  • a prompt message can be generated and output.
  • the judging whether the target parameter and the custom parameter are valid includes:
  • the format of the target parameter meets the first preset format requirement, and the format of the custom parameter meets the second preset format requirement, determining that the target parameter and the custom parameter are valid;
  • the format of the target parameter does not meet the first preset format requirement, or the format of the custom parameter does not meet the second preset format requirement, it is determined that the target parameter or the custom parameter is valid.
  • format verification can be performed on each parameter to determine whether the parameter meets the format requirements, such as detecting whether there are illegal characters, whether it exceeds the value range, and so on.
  • the length of the subnet mask created is in the range of 26-29. If the value entered by the user is not an integer or is not within the target range, a prompt message can be output.
  • you pass the network resource creation parameter vpcId you can rely on the newly created network segment resource, or you can rely on the historically created network segment resource.
  • VpcId the form is like vpcId: "Vpc-hssd7sds ", where Vpc-hssd7sds is the identification parameter uuid of the network segment resource. At this time, it is necessary to verify whether the uuid is true and valid, otherwise the resource creation will fail.
  • the resource template may include the template parameters and resource definition blocks of all resources corresponding to the custom parameters, that is, the parameter definitions of these resources are included.
  • the resource stack is a unit used to manage operations such as creation and deletion of a group of resources, and is itself a group of resources, that is, it is composed of multiple created resources.
  • the resource template can be regarded as a kind of resource configuration, and the parameters (configuration) of various resources are recorded according to the resource template.
  • the resource stack is a data structure, and resources are created in the resource stack. According to the resource template, there can be an empty stack without content. Then, continue to create resources in this empty stack to form a complete resource stack.
  • the creating a resource stack according to the resource template includes:
  • non-dependent resources are created in parallel through multiple threads, and dependent resources are created serially according to the dependent resource parameters to obtain a resource stack, wherein the resource stack includes multiple Resources, and the resource stack is stored in the blockchain.
  • the above-mentioned resource stack may also be stored in a node of a blockchain.
  • a resource must be created after the resource it depends on is created, otherwise the creation will fail. Therefore, for resources that do not depend on other resources, they can be created in a multi-threaded manner at the same time (parallel), and for resources that depend on other resources, the dependent resources (serial) must be created first.
  • the method further includes:
  • the serialized data is stored in the database.
  • the method further includes:
  • the user when the user performs a breakpoint resuming operation, it is executed after deserialization.
  • the resources in the resource stack are used as atomic nodes.
  • the current node is created by the resource orchestration engine, the result is displayed to the user in real time, and the current creation progress of the system can be viewed intuitively.
  • the operating system is composed of various resources and provides an operating environment for various programs.
  • the corresponding system construction program is called to construct the operating system.
  • the resources in the resource stack include 2 core 4G cloud CPU, 8G cloud memory, 100G cloud space, it can be constructed A cloud system with a 2-core 4G CPU, 8G memory, and 100G capacity.
  • the latest available resource parameter list can be obtained through the associated query for the user to choose, which can reduce the user’s input of invalid resource parameters.
  • the latest available resource parameter list can be obtained through the associated query for the user to choose, which can reduce the user’s input of invalid resource parameters.
  • To verify the resource parameters to feed back the cause of the error to the user avoid the user from entering invalid resource parameters again, and improve the success rate of resource creation, thereby improving the efficiency of system construction.
  • FIG. 2 is a functional module diagram of a preferred embodiment of an operating system construction device disclosed in the present application.
  • the operating system construction device runs in an electronic device.
  • the operating system construction device may include a plurality of functional modules composed of program code segments, and the program is a series of computer-readable instruction codes.
  • the program code of each program segment in the operating system construction device may be stored in a memory and executed by at least one processor to execute part or all of the steps in the operating system construction method described in FIG. 1, for details, please refer to The related description in the method shown in FIG. 1 will not be repeated here.
  • the operating system construction device can be divided into multiple functional modules according to the functions it performs.
  • the functional modules may include: an acquisition module 201, a receiving module 202, a verification module 203, a generation module 204, a creation module 205, and a construction module 206.
  • the module referred to in this application refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, and are stored in a memory.
  • the obtaining module 201 is configured to obtain a list of available resource parameters through associated queries.
  • the associated query may be to query all resources, obtain available resources, and query various parameters associated with these available resources.
  • the available resource parameter list is the resource parameter of the currently idle resource.
  • the receiving module 202 is configured to receive the target parameter selected by the user from the list of available resource parameters and the user-defined parameter input by the user.
  • all parameters in the available resource parameter list can be output (displayed), and the user can select and input the parameters he wants according to all the parameters in the available resource parameter list.
  • the verification module 203 is configured to use a verification algorithm to verify the target parameter and the custom parameter to obtain a verification result, wherein the verification algorithm includes an integrity verification algorithm and a validity verification Algorithm and dependency check algorithm.
  • the verification result is used to indicate whether the target parameter and the custom parameter are correct and the reason for the error.
  • the target parameter and the type, value range, and length of the custom parameter can be verified.
  • the length of the subnet mask is limited to 22 to 26.
  • the generating module 204 is configured to generate a resource template according to the target parameter and the custom parameter if the verification result indicates that the target parameter and the custom parameter are correct.
  • the resource template may include the template parameters and resource definition blocks of all resources corresponding to the custom parameters, that is, the parameter definitions of these resources are included.
  • the creation module 205 is configured to create a resource stack according to the resource template.
  • the resource stack is a unit used to manage operations such as creation and deletion of a group of resources, and is itself a group of resources, that is, it is composed of multiple created resources.
  • the resource template can be regarded as a kind of resource configuration, and the parameters (configuration) of various resources are recorded according to the resource template.
  • the resource stack is a data structure, and resources are created in the resource stack. According to the resource template, there can be an empty stack without content. Then, continue to create resources in this empty stack to form a complete resource stack.
  • the construction module 206 is used to construct a running system according to the resource stack.
  • the operating system is composed of various resources and provides an operating environment for various programs.
  • the corresponding system construction program is called to build the operating system.
  • the resources in the resource stack include 2 core 4G cloud CPU, 8G cloud memory, 100G cloud space, it can be built A cloud system with a 2-core 4G CPU, 8G memory, and 100G capacity.
  • the verification module 203 uses a verification algorithm to verify the target parameter and the custom parameter, and the specific method for obtaining the verification result is as follows:
  • a resource may have multiple parameters, and it is necessary to ensure that the parameters of various resources conform to specifications and are complete.
  • There may be a dependency relationship between different resources. It is necessary to determine whether the dependency input by the user is correct. You can confirm whether the resource of the dependency relationship exists. If it exists, determine the dependency relationship is correct. If the resource of the dependency relationship cannot be found, determine the dependency relationship is incorrect.
  • the network resource depends on the network segment resource (vpc), and the output identification parameter (uuid) created by the network segment resource can be used as an input parameter and passed to the network resource as the network segment identifier (vpcId) and saved as an attribute parameter.
  • the verification module 203 uses an integrity verification algorithm to determine whether the target parameter and the custom parameter are complete, specifically as follows:
  • the first resource definition block it is judged whether there is a first missing parameter in the target parameter, and according to the second resource definition block, it is judged whether there is a second missing parameter in the custom parameter, wherein, the The first missing parameter does not have a corresponding parameter definition in the first resource definition block, and the second missing parameter does not have a corresponding parameter definition in the second resource definition block;
  • the target parameter and the custom parameter are complete.
  • the resource block can be all parameter definitions of a certain type of resource.
  • the parameters of a certain type of resource input by the user can be checked one by one to ensure that the parameters input by the user are complete.
  • a prompt message can be generated and output.
  • the method for the verification module 203 to determine whether the target parameter and the custom parameter are valid is specifically as follows:
  • the format of the target parameter meets the first preset format requirement, and the format of the custom parameter meets the second preset format requirement, determining that the target parameter and the custom parameter are valid;
  • the format of the target parameter does not meet the first preset format requirement, or the format of the custom parameter does not meet the second preset format requirement, it is determined that the target parameter or the custom parameter is valid.
  • format verification can be performed on each parameter to determine whether the parameter meets the format requirements, such as detecting whether there are illegal characters, whether it exceeds the value range, and so on.
  • the length of the subnet mask created is in the range of 26-29. If the value entered by the user is not an integer or is not within the target range, a prompt message can be output.
  • you pass the network resource creation parameter vpcId you can rely on the newly created network segment resource, or you can rely on the historically created network segment resource.
  • VpcId the form is like vpcId: "Vpc-hssd7sds ", where Vpc-hssd7sds is the identification parameter uuid of the network segment resource. At this time, it is necessary to verify whether the uuid is true and valid, otherwise the resource creation will fail.
  • the creating a resource stack according to the resource template includes:
  • the creation module 205 is also used to create an empty stack
  • the operating system construction device may further include:
  • the determining module is configured to determine, from all resource parameters indicated by the resource template, dependent resource parameters with a dependency relationship and non-dependent resource parameters with no dependency relationship;
  • the creation module 205 is further configured to create, in the empty stack, non-dependent resources in parallel through multithreading according to the non-dependent resource parameters, and serially create dependent resources based on the dependent resource parameters to obtain a resource stack ,
  • the resource stack includes a plurality of resources, and the resource stack is stored in a blockchain.
  • a resource must be created after the resource it depends on is created, otherwise the creation will fail. Therefore, for resources that do not depend on other resources, they can be created in a multi-threaded manner at the same time (parallel), and for resources that depend on other resources, the dependent resources (serial) must be created first.
  • the obtaining module 201 is further configured to obtain the current context environment if the creation of the resource stack fails;
  • the operating system construction device may further include:
  • the serialization module is used to serialize the current context environment to obtain serialized data
  • the storage module is used to store the serialized data in the database.
  • the receiving module 202 is further configured to receive the breakpoint resume command input by the user after the storage module stores the serialized data in the database, and obtain it from the database The serialized data;
  • the operating system construction device may further include:
  • the deserialization module is used to deserialize the serialized data to obtain the current context environment
  • the creation module 205 is further configured to continue to create the resource stack according to the current context environment.
  • the user when the user performs a breakpoint resuming operation, it is executed after deserialization.
  • the resources in the resource stack are used as atomic nodes.
  • the current node is created by the resource orchestration engine, the result is displayed to the user in real time, and the current creation progress of the system can be viewed intuitively.
  • the latest available resource parameter list can be obtained through the associated query for the user to choose, which can reduce the user’s input of invalid resource parameters, and at the same time, create a set of resources (resource stack ) Before, check the resource parameters to feed back the cause of the error to the user, avoid the user from entering invalid resource parameters again, improve the success rate of resource creation, and thus improve the construction efficiency of the system.
  • FIG. 3 is a schematic structural diagram of an electronic device implementing a preferred embodiment of the method for constructing an operating system according to the present application.
  • the electronic device 3 includes a memory 31, at least one processor 32, computer readable instructions 33 stored in the memory 31 and executable on the at least one processor 32, and at least one communication bus 34.
  • FIG. 3 is only an example of the electronic device 3, and does not constitute a limitation on the electronic device 3. It may include more or less components than those shown in the figure, or a combination. Certain components, or different components, for example, the electronic device 3 may also include input and output devices, network access devices, and so on.
  • the electronic device 3 also includes, but is not limited to, any electronic product that can interact with the user through a keyboard, a mouse, a remote control, a touch panel, or a voice control device, for example, a personal computer, a tablet computer, a smart phone, etc.
  • Personal digital assistants Personal Digital Assistant, PDA
  • game consoles interactive network television (Internet Protocol Television, IPTV), smart wearable devices, etc.
  • the at least one processor 32 may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application specific integrated circuits (ASICs). ), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the processor 32 can be a microprocessor, or the processor 32 can also be any conventional processor, etc.
  • the processor 32 is the control center of the electronic device 3, and connects the entire electronic device 3 through various interfaces and lines. Parts.
  • the memory 31 may be used to store the computer-readable instructions 33 and/or modules/units, and the processor 32 can run or execute the computer-readable instructions and/or modules/units stored in the memory 31, and
  • the data stored in the memory 31 is called to realize various functions of the electronic device 3.
  • the memory 31 may mainly include a storage program area and a storage data area.
  • the storage program area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may Data and the like created in accordance with the use of the electronic device 3 are stored.
  • the memory 31 may include volatile memory such as high-speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), and a secure digital ( Secure Digital, SD card, Flash Card, at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
  • volatile memory such as high-speed random access memory
  • non-volatile memory such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), and a secure digital ( Secure Digital, SD card, Flash Card, at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
  • non-volatile memory such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), and a secure digital ( Secure Digital, SD card, Flash Card, at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage
  • the memory 31 in the electronic device 3 stores multiple instructions to implement a method for constructing a running system, and the processor 32 can execute the multiple instructions to achieve:
  • check algorithm to check the target parameter and the custom parameter to obtain a check result, where the check algorithm includes an integrity check algorithm, a validity check algorithm, and a dependency check algorithm ;
  • an operating system is constructed.
  • a recognition model can be trained to recognize the entire line of English text by using a large set of pictures of English handwritten text lines.
  • the text is not deformed, and the brightness, contrast, saturation, and noise of the picture are randomly adjusted to simulate the types of pictures generated in different scenes, which can improve the accuracy of the recognition model, and can recognize English text lines in various pictures.
  • the insufficient length of the images is supplemented to ensure that all the images have the same length and width, so that a large number of images can be used for training at the same time, which improves the speed of training the recognition model.
  • the integrated module/unit of the electronic device 3 may be stored in a computer-readable storage medium, which may be non-easy.
  • a volatile storage medium can also be a volatile storage medium.
  • the computer-readable instruction includes computer-readable instruction code
  • the computer-readable instruction code may be in the form of source code, object code, executable file, or some intermediate form.
  • the computer-readable medium may include: any entity or device capable of carrying the computer-readable instruction code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory).
  • modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional modules in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional modules.

Abstract

一种运行系统构建方法、装置、电子设备及存储介质,涉及人工智能技术领域,该方法包括:通过关联查询,获取可用资源参数列表(S11);接收用户从可用资源参数列表中选择的目标参数以及用户输入的自定义参数(S12);使用校验算法,对目标参数以及自定义参数进行校验,获得校验结果(S13),其中,校验算法包括完整性校验算法、有效性校验算法以及依赖关系校验算法;若校验结果表示目标参数以及自定义参数正确,根据目标参数以及自定义参数,生成资源模板(S14);根据资源模板,创建资源栈(S15);根据资源栈,构建运行系统(S16)。该方法能提高系统的构建效率。

Description

运行系统构建方法、装置、电子设备及存储介质
本申请要求于2020年04月23日提交中国专利局,申请号为202010329359.9发明名称为“运行系统构建方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能技术领域,尤其涉及一种运行系统构建方法、装置、电子设备及存储介质。
背景技术
目前,随着计算机技术的发展,可以直接调用指定模板去创建一个系统所需要的资源,完成系统的构建。但发明人意识到,在调用模板时,需要用户输入资源参数,用户无法确定所输入的资源参数是否正确,若输入的资源参数不正确,会导致资源创建失败,用户可能需要调整多次其输入的资源参数,才能成功地创建资源并构建成系统,系统的构建效率不高。
因此,如何提高系统的构建效率是一个亟需解决的技术问题。
发明内容
鉴于以上内容,有必要提供一种运行系统构建方法、装置、电子设备及存储介质,能够提高系统的构建效率。
本申请的第一方面提供一种运行系统构建方法,所述方法包括:
通过关联查询,获取可用资源参数列表;
接收用户从所述可用资源参数列表中选择的目标参数以及所述用户输入的自定义参数;
使用校验算法,对所述目标参数以及所述自定义参数进行校验,获得校验结果,其中,所述校验算法包括完整性校验算法、有效性校验算法以及依赖关系校验算法;
若所述校验结果表示所述目标参数以及所述自定义参数正确,根据所述目标参数以及所述自定义参数,生成资源模板;
根据所述资源模板,创建资源栈;
根据所述资源栈,构建运行系统。
本申请的第二方面提供一种电子设备,所述电子设备包括处理器和存储器,所述处理器用于执行所述存储器中存储的计算机可读指令以实现以下步骤:
通过关联查询,获取可用资源参数列表;
接收用户从所述可用资源参数列表中选择的目标参数以及所述用户输入的自定义参数;
使用校验算法,对所述目标参数以及所述自定义参数进行校验,获得校验结果,其中,所述校验算法包括完整性校验算法、有效性校验算法以及依赖关系校验算法;
若所述校验结果表示所述目标参数以及所述自定义参数正确,根据所述目标参数以及所述自定义参数,生成资源模板;
根据所述资源模板,创建资源栈;
根据所述资源栈,构建运行系统。
本申请的第三方面提供一种计算机可读存储介质,所述计算机可读存储介质上存储有至少一个计算机可读指令,所述至少一个计算机可读指令被处理器执行以实现以下步骤:
通过关联查询,获取可用资源参数列表;
接收用户从所述可用资源参数列表中选择的目标参数以及所述用户输入的自定义参数;
使用校验算法,对所述目标参数以及所述自定义参数进行校验,获得校验结果,其中,所述校验算法包括完整性校验算法、有效性校验算法以及依赖关系校验算法;
若所述校验结果表示所述目标参数以及所述自定义参数正确,根据所述目标参数以及所述自定义参数,生成资源模板;
根据所述资源模板,创建资源栈;
根据所述资源栈,构建运行系统。
本申请的第四方面提供一种运行系统构建装置,所述装置包括:
获取模块,用于通过关联查询,获取可用资源参数列表;
接收模块,用于接收用户从所述可用资源参数列表中选择的目标参数以及所述用户输入的自定义参数;
校验模块,用于使用校验算法,对所述目标参数以及所述自定义参数进行校验,获得校验结果,其中,所述校验算法包括完整性校验算法、有效性校验算法以及依赖关系校验算法;
生成模块,用于若所述校验结果表示所述目标参数以及所述自定义参数正确,根据所述目标参数以及所述自定义参数,生成资源模板;
创建模块,用于根据所述资源模板,创建资源栈;
构建模块,用于根据所述资源栈,构建运行系统。
由以上技术方案,本申请中,可以通过关联查询,获取到最新的可以使用的资源参数列表给用户选择,可以减少用户输入无效的资源参数,同时,在创建一组资源(资源栈)前,对资源参数进行校验,以将出错的原因反馈给用户,避免用户再次输入无效的资源参数,提高资源创建的成功率,从而提高了系统的构建效率。
附图说明
图1是本申请公开的一种运行系统构建方法的较佳实施例的流程图。
图2是本申请公开的一种运行系统构建装置的较佳实施例的功能模块图。
图3是本申请实现运行系统构建方法的较佳实施例的电子设备的结构示意图。
具体实施方式
本申请实施例的运行系统构建方法应用在电子设备中,也可以应用在电子设备和通过网络与所述电子设备进行连接的服务器所构成的硬件环境中,由服务器和电子设备共同执行。网络包括但不限于:广域网、城域网或局域网。
请参见图1,图1是本申请公开的一种运行系统构建方法的较佳实施例的流程图。其中,根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。所述运行系统构建方法的执行主体可以为电子设备。
S11、通过关联查询,获取可用资源参数列表。
其中,所述关联查询可以是对所有资源进行查询,获取可用的资源,并查询出与这些可用资源关联的各项参数。
其中,可用资源参数列表为当前空闲的资源的资源参数。
S12、接收用户从所述可用资源参数列表中选择的目标参数以及所述用户输入的自定义参数。
本申请实施例中,可以输出(显示)所述可用资源参数列表中的所有参数,用户可以根据所述可用资源参数列表中的所有参数来进行选择、输入自己想要的参数。
S13、使用校验算法,对所述目标参数以及所述自定义参数进行校验,获得校验结果,其中,所述校验算法包括完整性校验算法、有效性校验算法以及依赖关系校验算法。
其中,所述校验结果用来表示所述目标参数以及所述自定义参数是否正确以及出错的原因。
本申请实施例中,可以对所述目标参数以及所述自定义参数的类型、取值范围、长度等方面进行校验。比如子网掩码长度范围限制为22至26,可以通过设置子网掩码最长属性值(MaxValue)以及设置子网掩码最短属性值(MinValue),可以直接调用来判断子网掩码参数的长度是否符合规范。生成校验结果。
具体的,所述使用校验算法,对所述目标参数以及所述自定义参数进行校验,获得校验结果包括:
使用完整性校验算法,判断所述目标参数以及所述自定义参数是否完整;
若所述多个自定义参数完整,使用有效性校验算法,判断所述目标参数以及所述自定义参数是否有效;
若所述多个自定义参数有效,根据依赖关系校验算法,判断所述目标参数的依赖关系是否正确,以及判断所述自定义参数的依赖关系是否正确;
若所述目标参数的依赖关系正确,且所述自定义参数的依赖关系正确,生成表示所述自定义参数正确的校验结果。
在该可选的实施方式中,一种资源可以有多个参数,需要确保各种资源的参数符合规范且完整。不同资源之间可能存在依赖关系,需要确定用户输入的依赖关系是否正确,可以确认依赖关系的资源是否存在,若存在,确定依赖关系正确,若找不到依赖关系的资源,确定依赖关系不正确。比如网络资源(Network)依赖网段资源(vpc),可使用网段资源创建的输出标识参数(uuid)作为输入参数传递给网络资源作为网段标识(vpcId)保存为某个属性参数。可以使用字符(比如:Ref:A),表示依赖资源A输出参数uuid;可以使用字符(比如:Ref:Fn::GetAtt":["A","vpcId"]),表示将资源A的输出参数vpcId赋值给目标参数。
具体的,所述使用完整性校验算法,判断所述目标参数以及所述自定义参数是否完整包括:
确定所述目标参数对应的第一资源定义块,以及确定所述自定义参数对应的第二资源定义块;
根据所述第一资源定义块,判断所述目标参数中是否存在第一缺失参数,以及根据所述第二资源定义块,判断所述自定义参数中是否存在第二缺失参数,其中,所述第一缺失参数在所述第一资源定义块中未存在对应的参数定义,所述第二缺失参数在所述第二资源定义块中未存在对应的参数定义;
若所述目标参数中存在第一缺失参数,或所述自定义参数中存在第二缺失参数,确定所述目标参数或所述自定义参数不完整;或
若所述目标参数中未存在第一缺失参数,且所述自定义参数中未存在第二缺失参数,确定所述目标参数以及所述自定义参数完整。
其中,资源块可以是某类资源的全部参数定义。
在该可选的实施方式中,可以对用户输入的某类资源的参数进行一一排查,确保所述用户输入的参数是完整的。可选的,若存在某个参数缺失,可以生成提示信息并输出。
具体的,所述判断所述目标参数以及所述自定义参数是否有效包括:
获取所述目标参数对应的第一预设格式要求以及获取所述自定义参数对应的第二预设格式要求;
判断所述目标参数的格式是否符合所述第一预设格式要求,以及判断所述自定义参数的格式是否符合所述第二预设格式要求;
若所述目标参数的格式符合所述第一预设格式要求,且所述自定义参数的格式符合所述第二预设格式要求,确定所述目标参数以及所述自定义参数有效;
若所述目标参数的格式未符合所述第一预设格式要求,或所述自定义参数的格式未符合所述第二预设格式要求,确定所述目标参数或所述自定义参数有效。
在该可选的实施方式中,可以对每个参数进行格式校验,判断参数是否符合格式要求,比如检测是否存在非法字符、是否超出取值范围等。比如创建子网掩码的长度范围为26-29,如果用户输入的值非整型或者不在目标范围内,则可输出提示信息。此外,如过网络资源的创建参数vpcId,即可依赖新建的网段资源,也可依赖历史创建的网段资源,若使用历史创建的网段资源参数vpcId,则形式如vpcId:”Vpc-hssd7sds”,其中Vpc-hssd7sds为网段资源的标识参数uuid,此时需要校验uuid是否是真实有效,否则将导致资源创建失败。
S14、若所述校验结果表示所述目标参数以及所述自定义参数正确,根据所述目标参数以及所述自定义参数,生成资源模板。
其中,所述资源模板可以包括所述模板参数以及所述自定义参数对应的所有资源的资源定义块,即包括了这些资源的参数定义。
S15、根据所述资源模板,创建资源栈。
其中,所述资源栈是用来管理一组资源创建、删除等操作的单位,其本身就是一组资源,即由创建的多个资源构成。
其中,资源模板是可以被看成是一种资源配置,根据资源模板记录了各项资源的参数(配置)。资源栈是一种数据结构,在资源栈在创建资源。根据所述资源模板,可以未有内容的空栈。然后,不断在这个空栈中创建资源,形成完整的资源栈。
具体的,所述根据所述资源模板,创建资源栈包括:
创建空栈;
从所述资源模板所指示的所有资源参数中确定存在依赖关系的依赖资源参数以及确定不存在依赖关系的非依赖资源参数;
在所述空栈中,根据所述非依赖资源参数,通过多线程并行创建非依赖资源,以及根据所述依赖资源参数,串行创建依赖资源,获得资源栈,其中,所述资源栈包括多个资源,所述资源栈存储在区块链中。
需要强调的是,为进一步保证上述资源栈的私密和安全性,上述资源栈还可以存储于一区块链的节点中。
在该可选的实施方式中,一个资源必须在其依赖的资源创建之后再创建,否则会创建失败。因此,对于不依赖其他资源的资源,可以通过多线程的方式同时(并行)进行创建,对于依赖其他资源的资源,必须先创建被依赖的资源(串行)。
作为一种可选的实施方式,所述方法还包括:
若所述资源栈创建失败,获取当前上下文环境;
将所述当前上下文环境序列化,获得序列化数据;
将所述序列化数据存储至数据库中。
在该可选的实施方式中,在资源创建过程中,如果某一资源创建失败,则保存当前上下文环境并序列化在数据库中。
作为一种可选的实施方式,所述将所述序列化数据存储至数据库中之后,所述方法还包括:
接收用户输入的断点续作指令,从所述数据库中获取所述序列化数据;
将所述序列化数据进行反序列化,获得所述当前上下文环境;
根据所述当前上下文环境,继续创建所述资源栈。
在该可选的实施方式中,当用户进行断点续作时,反序列化后进行执行。资源栈中的资源作为原子节点,当资源编排引擎创建完当前节点,结果实时显示给用户,可以直观地查看系统当前创建进度。
S16、根据所述资源栈,构建运行系统。
其中,所述运行系统由各种资源组成,为各种程序提供运行环境。
本申请实施例中,根据所述资源栈中的各个资源,调用对应的系统构建程序构建运行系统,若资源栈中的资源包括2核4G的云CPU,8G云内存,100G云空间,可以构建一个2核4G的CPU、8G内存、100G容量的云系统。
在图1所描述的方法流程中,可以通过关联查询,获取到最新的可以使用的资源参数列表给用户选择,可以减少用户输入无效的资源参数,同时,在创建一组资源(资源栈)前,对资源参数进行校验,以将出错的原因反馈给用户,避免用户再次输入无效的资源参数,提高资源创建的成功率,从而提高了系统的构建效率。
以上所述,仅是本申请的具体实施方式,但本申请的保护范围并不局限于此,对于本领域的普通技术人员来说,在不脱离本申请创造构思的前提下,还可以做出改进,但这些均属于本申请的保护范围。
请参见图2,图2是本申请公开的一种运行系统构建装置的较佳实施例的功能模块图。
在一些实施例中,所述运行系统构建装置运行于电子设备中。所述运行系统构建装置可以包括多个由程序代码段所组成的功能模块,所述程序是一系列的计算机可读指令代码。所述运行系统构建装置中的各个程序段的程序代码可以存储于存储器中,并由至少一个处理器所执行,以执行图1所描述的运行系统构建方法中的部分或全部步骤,具体可以参照图1所述方法中的相关描述,在此不再赘述。
本实施例中,所述运行系统构建装置根据其所执行的功能,可以被划分为多个功能模块。所述功能模块可以包括:获取模块201、接收模块202、校验模块203、生成模块204、创建模块205及构建模块206。本申请所称的模块是指一种能够被至少一个处理器所执行并且能够完成固定功能的一系列计算机程序段,其存储在存储器中。
获取模块201,用于通过关联查询,获取可用资源参数列表。
其中,所述关联查询可以是对所有资源进行查询,获取可用的资源,并查询出与这些可用资源关联的各项参数。
其中,可用资源参数列表为当前空闲的资源的资源参数。
接收模块202,用于接收用户从所述可用资源参数列表中选择的目标参数以及所述用户输入的自定义参数。
本申请实施例中,可以输出(显示)所述可用资源参数列表中的所有参数,用户可以根据所述可用资源参数列表中的所有参数来进行选择、输入自己想要的参数。
校验模块203,用于使用校验算法,对所述目标参数以及所述自定义参数进行校验,获得校验结果,其中,所述校验算法包括完整性校验算法、有效性校验算法以及依赖关系校验算法。
其中,所述校验结果用来表示所述目标参数以及所述自定义参数是否正确以及出错的原因。
本申请实施例中,可以对所述目标参数以及所述自定义参数的类型、取值范围、长度等方面进行校验。比如子网掩码长度范围限制为22至26,可以通过设置子网掩码最长属性值(MaxValue)以及设置子网掩码最短属性值(MinValue),可以直接调用来判断子网掩码参数的长度是否符合规范。生成校验结果。
生成模块204,用于若所述校验结果表示所述目标参数以及所述自定义参数正确,根据 所述目标参数以及所述自定义参数,生成资源模板。
其中,所述资源模板可以包括所述模板参数以及所述自定义参数对应的所有资源的资源定义块,即包括了这些资源的参数定义。
创建模块205,用于根据所述资源模板,创建资源栈。
其中,所述资源栈是用来管理一组资源创建、删除等操作的单位,其本身就是一组资源,即由创建的多个资源构成。
其中,资源模板是可以被看成是一种资源配置,根据资源模板记录了各项资源的参数(配置)。资源栈是一种数据结构,在资源栈在创建资源。根据所述资源模板,可以未有内容的空栈。然后,不断在这个空栈中创建资源,形成完整的资源栈。
构建模块206,用于根据所述资源栈,构建运行系统。
其中,所述运行系统由各种资源组成,为各种程序提供运行环境。
本申请实施例中,根据所述资源栈中的各个资源,调用对应的系统构建程序构建运行系统,若资源栈中的资源包括2核4G的云CPU,8G云内存,100G云空间,可以构建一个2核4G的CPU、8G内存、100G容量的云系统。
作为一种可选的实施方式,所述校验模块203使用校验算法,对所述目标参数以及所述自定义参数进行校验,获得校验结果的方式具体为:
使用完整性校验算法,判断所述目标参数以及所述自定义参数是否完整;
若所述多个自定义参数完整,使用有效性校验算法,判断所述目标参数以及所述自定义参数是否有效;
若所述多个自定义参数有效,根据依赖关系校验算法,判断所述目标参数的依赖关系是否正确,以及判断所述自定义参数的依赖关系是否正确;
若所述目标参数的依赖关系正确,且所述自定义参数的依赖关系正确,生成表示所述自定义参数正确的校验结果。
在该可选的实施方式中,一种资源可以有多个参数,需要确保各种资源的参数符合规范且完整。不同资源之间可能存在依赖关系,需要确定用户输入的依赖关系是否正确,可以确认依赖关系的资源是否存在,若存在,确定依赖关系正确,若找不到依赖关系的资源,确定依赖关系不正确。比如网络资源(Network)依赖网段资源(vpc),可使用网段资源创建的输出标识参数(uuid)作为输入参数传递给网络资源作为网段标识(vpcId)保存为某个属性参数。可以使用字符(比如:Ref:A),表示依赖资源A输出参数uuid;可以使用字符(比如:Ref:Fn::GetAtt":["A","vpcId"]),表示将资源A的输出参数vpcId赋值给目标参数。
作为一种可选的实施方式,所述校验模块203使用完整性校验算法,判断所述目标参数以及所述自定义参数是否完整的方式具体为:
确定所述目标参数对应的第一资源定义块,以及确定所述自定义参数对应的第二资源定义块;
根据所述第一资源定义块,判断所述目标参数中是否存在第一缺失参数,以及根据所述第二资源定义块,判断所述自定义参数中是否存在第二缺失参数,其中,所述第一缺失参数在所述第一资源定义块中未存在对应的参数定义,所述第二缺失参数在所述第二资源定义块中未存在对应的参数定义;
若所述目标参数中存在第一缺失参数,或所述自定义参数中存在第二缺失参数,确定所述目标参数或所述自定义参数不完整;或
若所述目标参数中未存在第一缺失参数,且所述自定义参数中未存在第二缺失参数,确定所述目标参数以及所述自定义参数完整。
其中,资源块可以是某类资源的全部参数定义。
在该可选的实施方式中,可以对用户输入的某类资源的参数进行一一排查,确保所述用 户输入的参数是完整的。可选的,若存在某个参数缺失,可以生成提示信息并输出。
作为一种可选的实施方式,所述校验模块203判断所述目标参数以及所述自定义参数是否有效的方式具体为:
获取所述目标参数对应的第一预设格式要求以及获取所述自定义参数对应的第二预设格式要求;
判断所述目标参数的格式是否符合所述第一预设格式要求,以及判断所述自定义参数的格式是否符合所述第二预设格式要求;
若所述目标参数的格式符合所述第一预设格式要求,且所述自定义参数的格式符合所述第二预设格式要求,确定所述目标参数以及所述自定义参数有效;
若所述目标参数的格式未符合所述第一预设格式要求,或所述自定义参数的格式未符合所述第二预设格式要求,确定所述目标参数或所述自定义参数有效。
在该可选的实施方式中,可以对每个参数进行格式校验,判断参数是否符合格式要求,比如检测是否存在非法字符、是否超出取值范围等。比如创建子网掩码的长度范围为26-29,如果用户输入的值非整型或者不在目标范围内,则可输出提示信息。此外,如过网络资源的创建参数vpcId,即可依赖新建的网段资源,也可依赖历史创建的网段资源,若使用历史创建的网段资源参数vpcId,则形式如vpcId:”Vpc-hssd7sds”,其中Vpc-hssd7sds为网段资源的标识参数uuid,此时需要校验uuid是否是真实有效,否则将导致资源创建失败。
作为一种可选的实施方式,所述根据所述资源模板,创建资源栈包括:
所述创建模块205,还用于创建空栈;
所述运行系统构建装置还可以包括:
确定模块,用于从所述资源模板所指示的所有资源参数中确定存在依赖关系的依赖资源参数以及确定不存在依赖关系的非依赖资源参数;
所述创建模块205,还用于在所述空栈中,根据所述非依赖资源参数,通过多线程并行创建非依赖资源,以及根据所述依赖资源参数,串行创建依赖资源,获得资源栈,其中,所述资源栈包括多个资源,所述资源栈存储在区块链中。
在该可选的实施方式中,一个资源必须在其依赖的资源创建之后再创建,否则会创建失败。因此,对于不依赖其他资源的资源,可以通过多线程的方式同时(并行)进行创建,对于依赖其他资源的资源,必须先创建被依赖的资源(串行)。
作为一种可选的实施方式,获取模块201,还用于若所述资源栈创建失败,获取当前上下文环境;
所述运行系统构建装置还可以包括:
序列化模块,用于将所述当前上下文环境序列化,获得序列化数据;
存储模块,用于将所述序列化数据存储至数据库中。
在该可选的实施方式中,在资源创建过程中,如果某一资源创建失败,则保存当前上下文环境并序列化在数据库中。
作为一种可选的实施方式,所述接收模块202,还用于所述存储模块将所述序列化数据存储至数据库中之后,接收用户输入的断点续作指令,从所述数据库中获取所述序列化数据;
所述运行系统构建装置还可以包括:
反序列化模块,用于将所述序列化数据进行反序列化,获得所述当前上下文环境;
所述创建模块205,还用于根据所述当前上下文环境,继续创建所述资源栈。
在该可选的实施方式中,当用户进行断点续作时,反序列化后进行执行。资源栈中的资源作为原子节点,当资源编排引擎创建完当前节点,结果实时显示给用户,可以直观地查看系统当前创建进度。
在图2所描述的运行系统构建装置中,可以通过关联查询,获取到最新的可以使用的资 源参数列表给用户选择,可以减少用户输入无效的资源参数,同时,在创建一组资源(资源栈)前,对资源参数进行校验,以将出错的原因反馈给用户,避免用户再次输入无效的资源参数,提高资源创建的成功率,从而提高了系统的构建效率。
如图3所示,图3是本申请实现运行系统构建方法的较佳实施例的电子设备的结构示意图。所述电子设备3包括存储器31、至少一个处理器32、存储在所述存储器31中并可在所述至少一个处理器32上运行的计算机可读指令33及至少一条通讯总线34。
本领域技术人员可以理解,图3所示的示意图仅仅是所述电子设备3的示例,并不构成对所述电子设备3的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述电子设备3还可以包括输入输出设备、网络接入设备等。
所述电子设备3还包括但不限于任何一种可与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、个人数字助理(Personal Digital Assistant,PDA)、游戏机、交互式网络电视(Internet Protocol Television,IPTV)、智能式穿戴式设备等。
所述至少一个处理器32可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。该处理器32可以是微处理器或者该处理器32也可以是任何常规的处理器等,所述处理器32是所述电子设备3的控制中心,利用各种接口和线路连接整个电子设备3的各个部分。
所述存储器31可用于存储所述计算机可读指令33和/或模块/单元,所述处理器32通过运行或执行存储在所述存储器31内的计算机可读指令和/或模块/单元,以及调用存储在存储器31内的数据,实现所述电子设备3的各种功能。所述存储器31可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备3的使用所创建的数据等。此外,存储器31可以包括高速随机存取存储器等易失性存储器,还可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。
结合图1,所述电子设备3中的所述存储器31存储多个指令以实现一种运行系统构建方法,所述处理器32可执行所述多个指令从而实现:
通过关联查询,获取可用资源参数列表;
接收用户从所述可用资源参数列表中选择的目标参数以及所述用户输入的自定义参数;
使用校验算法,对所述目标参数以及所述自定义参数进行校验,获得校验结果,其中,所述校验算法包括完整性校验算法、有效性校验算法以及依赖关系校验算法;
若所述校验结果表示所述目标参数以及所述自定义参数正确,根据所述目标参数以及所述自定义参数,生成资源模板;
根据所述资源模板,创建资源栈;
根据所述资源栈,构建运行系统。
具体地,所述处理器32对上述指令的具体实现方法可参考图1对应实施例中相关步骤的描述,在此不赘述。
在图3所描述的电子设备3中,可以通过使用大量的英文手写文本行图片集训练出识别模型来识别整行英文文本,其中,将训练用的图片进行等比例缩放,保证了图片中的文字没有发生形变,并对图片的亮度、对比度、饱和度、噪声进行随机的调整,模拟不同场景下产 生的图片类型,可以提高识别模型的精度,可以识别各种图片中的英文文本行。同时,在对训练用的图片进行等比例缩放后,对长度不足的图片进行补长度,保证所有图片的长度一致以及宽度一致,从而可以同时使用大量图片进行训练,提高了识别模型训练的速度。
所述电子设备3集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中,所述计算机可读存储介质可以是非易失性的存储介质,也可以是易失性的存储介质。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于计算机可读存储介质中,该计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机可读指令包括计算机可读指令代码,所述计算机可读指令代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存储器(RAM,Random Access Memory)。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。

Claims (20)

  1. 一种运行系统构建方法,其中,所述运行系统构建方法包括:
    通过关联查询,获取可用资源参数列表;
    接收用户从所述可用资源参数列表中选择的目标参数以及所述用户输入的自定义参数;
    使用校验算法,对所述目标参数以及所述自定义参数进行校验,获得校验结果,其中,所述校验算法包括完整性校验算法、有效性校验算法以及依赖关系校验算法;
    若所述校验结果表示所述目标参数以及所述自定义参数正确,根据所述目标参数以及所述自定义参数,生成资源模板;
    根据所述资源模板,创建资源栈;
    根据所述资源栈,构建运行系统。
  2. 根据权利要求1所述的运行系统构建方法,其中,所述使用校验算法,对所述目标参数以及所述自定义参数进行校验,获得校验结果包括:
    使用完整性校验算法,判断所述目标参数以及所述自定义参数是否完整;
    若所述多个自定义参数完整,使用有效性校验算法,判断所述目标参数以及所述自定义参数是否有效;
    若所述多个自定义参数有效,根据依赖关系校验算法,判断所述目标参数的依赖关系是否正确,以及判断所述自定义参数的依赖关系是否正确;
    若所述目标参数的依赖关系正确,且所述自定义参数的依赖关系正确,生成表示所述自定义参数正确的校验结果。
  3. 根据权利要求2所述的运行系统构建方法,其中,所述使用完整性校验算法,判断所述目标参数以及所述自定义参数是否完整包括:
    确定所述目标参数对应的第一资源定义块,以及确定所述自定义参数对应的第二资源定义块;
    根据所述第一资源定义块,判断所述目标参数中是否存在第一缺失参数,以及根据所述第二资源定义块,判断所述自定义参数中是否存在第二缺失参数,其中,所述第一缺失参数在所述第一资源定义块中未存在对应的参数定义,所述第二缺失参数在所述第二资源定义块中未存在对应的参数定义;
    若所述目标参数中存在第一缺失参数,或所述自定义参数中存在第二缺失参数,确定所述目标参数或所述自定义参数不完整;或
    若所述目标参数中未存在第一缺失参数,且所述自定义参数中未存在第二缺失参数,确定所述目标参数以及所述自定义参数完整。
  4. 根据权利要求2所述的运行系统构建方法,其中,所述判断所述目标参数以及所述自定义参数是否有效包括:
    获取所述目标参数对应的第一预设格式要求以及获取所述自定义参数对应的第二预设格式要求;
    判断所述目标参数的格式是否符合所述第一预设格式要求,以及判断所述自定义参数的格式是否符合所述第二预设格式要求;
    若所述目标参数的格式符合所述第一预设格式要求,且所述自定义参数的格式符合所述第二预设格式要求,确定所述目标参数以及所述自定义参数有效;
    若所述目标参数的格式未符合所述第一预设格式要求,或所述自定义参数的格式未符合所述第二预设格式要求,确定所述目标参数或所述自定义参数有效。
  5. 根据权利要求1至4中任一项所述的运行系统构建方法,其中,所述根据所述资源模板,创建资源栈包括:
    创建空栈;
    从所述资源模板所指示的所有资源参数中确定存在依赖关系的依赖资源参数以及确定不存在依赖关系的非依赖资源参数;
    在所述空栈中,根据所述非依赖资源参数,通过多线程并行创建非依赖资源,以及根据所述依赖资源参数,串行创建依赖资源,获得资源栈,其中,所述资源栈包括多个资源,所述资源栈存储在区块链中。
  6. 根据权利要求1至4中任一项所述的运行系统构建方法,其中,所述运行系统构建方法还包括:
    若所述资源栈创建失败,获取当前上下文环境;
    将所述当前上下文环境序列化,获得序列化数据;
    将所述序列化数据存储至数据库中。
  7. 根据权利要求6所述的运行系统构建方法,其中,所述将所述序列化数据存储至数据库中之后,所述运行系统构建方法还包括:
    接收用户输入的断点续作指令,从所述数据库中获取所述序列化数据;
    将所述序列化数据进行反序列化,获得所述当前上下文环境;
    根据所述当前上下文环境,继续创建所述资源栈。
  8. 一种电子设备,其中,所述电子设备包括处理器和存储器,所述处理器用于执行存储器中存储的至少一个计算机可读指令以实现以下步骤:
    通过关联查询,获取可用资源参数列表;
    接收用户从所述可用资源参数列表中选择的目标参数以及所述用户输入的自定义参数;
    使用校验算法,对所述目标参数以及所述自定义参数进行校验,获得校验结果,其中,所述校验算法包括完整性校验算法、有效性校验算法以及依赖关系校验算法;
    若所述校验结果表示所述目标参数以及所述自定义参数正确,根据所述目标参数以及所述自定义参数,生成资源模板;
    根据所述资源模板,创建资源栈;
    根据所述资源栈,构建运行系统。
  9. 根据权利要求8所述的电子设备,其中,在所述使用校验算法,对所述目标参数以及所述自定义参数进行校验,获得校验结果时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:
    使用完整性校验算法,判断所述目标参数以及所述自定义参数是否完整;
    若所述多个自定义参数完整,使用有效性校验算法,判断所述目标参数以及所述自定义参数是否有效;
    若所述多个自定义参数有效,根据依赖关系校验算法,判断所述目标参数的依赖关系是否正确,以及判断所述自定义参数的依赖关系是否正确;
    若所述目标参数的依赖关系正确,且所述自定义参数的依赖关系正确,生成表示所述自定义参数正确的校验结果。
  10. 根据权利要求9所述的电子设备,其中,在所述使用完整性校验算法,判断所述目标参数以及所述自定义参数是否完整时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:
    确定所述目标参数对应的第一资源定义块,以及确定所述自定义参数对应的第二资源定义块;
    根据所述第一资源定义块,判断所述目标参数中是否存在第一缺失参数,以及根据所述 第二资源定义块,判断所述自定义参数中是否存在第二缺失参数,其中,所述第一缺失参数在所述第一资源定义块中未存在对应的参数定义,所述第二缺失参数在所述第二资源定义块中未存在对应的参数定义;
    若所述目标参数中存在第一缺失参数,或所述自定义参数中存在第二缺失参数,确定所述目标参数或所述自定义参数不完整;或
    若所述目标参数中未存在第一缺失参数,且所述自定义参数中未存在第二缺失参数,确定所述目标参数以及所述自定义参数完整。
  11. 根据权利要求9所述的电子设备,其中,在所述判断所述目标参数以及所述自定义参数是否有效时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:
    获取所述目标参数对应的第一预设格式要求以及获取所述自定义参数对应的第二预设格式要求;
    判断所述目标参数的格式是否符合所述第一预设格式要求,以及判断所述自定义参数的格式是否符合所述第二预设格式要求;
    若所述目标参数的格式符合所述第一预设格式要求,且所述自定义参数的格式符合所述第二预设格式要求,确定所述目标参数以及所述自定义参数有效;
    若所述目标参数的格式未符合所述第一预设格式要求,或所述自定义参数的格式未符合所述第二预设格式要求,确定所述目标参数或所述自定义参数有效。
  12. 根据权利要求8至11中任一项所述的电子设备,其中,在所述根据所述资源模板,创建资源栈时,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:
    创建空栈;
    从所述资源模板所指示的所有资源参数中确定存在依赖关系的依赖资源参数以及确定不存在依赖关系的非依赖资源参数;
    在所述空栈中,根据所述非依赖资源参数,通过多线程并行创建非依赖资源,以及根据所述依赖资源参数,串行创建依赖资源,获得资源栈,其中,所述资源栈包括多个资源,所述资源栈存储在区块链中。
  13. 根据权利要求8至11中任一项所述的电子设备,其中,所述处理器执行所述至少一个计算机可读指令以实现以下步骤:
    若所述资源栈创建失败,获取当前上下文环境;
    将所述当前上下文环境序列化,获得序列化数据;
    将所述序列化数据存储至数据库中。
  14. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有至少一个计算机可读指令,所述至少一个计算机可读指令被处理器执行时实现以下步骤:
    通过关联查询,获取可用资源参数列表;
    接收用户从所述可用资源参数列表中选择的目标参数以及所述用户输入的自定义参数;
    使用校验算法,对所述目标参数以及所述自定义参数进行校验,获得校验结果,其中,所述校验算法包括完整性校验算法、有效性校验算法以及依赖关系校验算法;
    若所述校验结果表示所述目标参数以及所述自定义参数正确,根据所述目标参数以及所述自定义参数,生成资源模板;
    根据所述资源模板,创建资源栈;
    根据所述资源栈,构建运行系统。
  15. 根据权利要求14所述的存储介质,其中,在所述使用校验算法,对所述目标参数以及所述自定义参数进行校验,获得校验结果时,所述至少一个计算机可读指令被处理器执行以实现以下步骤:
    使用完整性校验算法,判断所述目标参数以及所述自定义参数是否完整;
    若所述多个自定义参数完整,使用有效性校验算法,判断所述目标参数以及所述自定义参数是否有效;
    若所述多个自定义参数有效,根据依赖关系校验算法,判断所述目标参数的依赖关系是否正确,以及判断所述自定义参数的依赖关系是否正确;
    若所述目标参数的依赖关系正确,且所述自定义参数的依赖关系正确,生成表示所述自定义参数正确的校验结果。
  16. 根据权利要求15所述的存储介质,其中,在所述使用完整性校验算法,判断所述目标参数以及所述自定义参数是否完整时,所述至少一个计算机可读指令被处理器执行以实现以下步骤:
    确定所述目标参数对应的第一资源定义块,以及确定所述自定义参数对应的第二资源定义块;
    根据所述第一资源定义块,判断所述目标参数中是否存在第一缺失参数,以及根据所述第二资源定义块,判断所述自定义参数中是否存在第二缺失参数,其中,所述第一缺失参数在所述第一资源定义块中未存在对应的参数定义,所述第二缺失参数在所述第二资源定义块中未存在对应的参数定义;
    若所述目标参数中存在第一缺失参数,或所述自定义参数中存在第二缺失参数,确定所述目标参数或所述自定义参数不完整;或
    若所述目标参数中未存在第一缺失参数,且所述自定义参数中未存在第二缺失参数,确定所述目标参数以及所述自定义参数完整。
  17. 根据权利要求15所述的存储介质,其中,在所述判断所述目标参数以及所述自定义参数是否有效时,所述至少一个计算机可读指令被处理器执行以实现以下步骤:
    获取所述目标参数对应的第一预设格式要求以及获取所述自定义参数对应的第二预设格式要求;
    判断所述目标参数的格式是否符合所述第一预设格式要求,以及判断所述自定义参数的格式是否符合所述第二预设格式要求;
    若所述目标参数的格式符合所述第一预设格式要求,且所述自定义参数的格式符合所述第二预设格式要求,确定所述目标参数以及所述自定义参数有效;
    若所述目标参数的格式未符合所述第一预设格式要求,或所述自定义参数的格式未符合所述第二预设格式要求,确定所述目标参数或所述自定义参数有效。
  18. 根据权利要求14至17中任一项所述的存储介质,其中,在所述根据所述资源模板,创建资源栈时,所述至少一个计算机可读指令被处理器执行时还用以实现以下步骤:
    创建空栈;
    从所述资源模板所指示的所有资源参数中确定存在依赖关系的依赖资源参数以及确定不存在依赖关系的非依赖资源参数;
    在所述空栈中,根据所述非依赖资源参数,通过多线程并行创建非依赖资源,以及根据所述依赖资源参数,串行创建依赖资源,获得资源栈,其中,所述资源栈包括多个资源,所述资源栈存储在区块链中。
  19. 根据权利要求14至17中任一项所述的存储介质,其中,所述至少一个计算机可读指令被处理器执行还用以实现以下步骤:
    若所述资源栈创建失败,获取当前上下文环境;
    将所述当前上下文环境序列化,获得序列化数据;
    将所述序列化数据存储至数据库中。
  20. 一种运行系统构建装置,其中,所述运行系统构建装置包括:
    获取模块,用于通过关联查询,获取可用资源参数列表;
    接收模块,用于接收用户从所述可用资源参数列表中选择的目标参数以及所述用户输入的自定义参数;
    校验模块,用于使用校验算法,对所述目标参数以及所述自定义参数进行校验,获得校验结果,其中,所述校验算法包括完整性校验算法、有效性校验算法以及依赖关系校验算法;
    生成模块,用于若所述校验结果表示所述目标参数以及所述自定义参数正确,根据所述目标参数以及所述自定义参数,生成资源模板;
    创建模块,用于根据所述资源模板,创建资源栈;
    构建模块,用于根据所述资源栈,构建运行系统。
PCT/CN2020/099312 2020-04-23 2020-06-30 运行系统构建方法、装置、电子设备及存储介质 WO2021212661A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010329359.9A CN111679893A (zh) 2020-04-23 2020-04-23 运行系统构建方法、装置、电子设备及存储介质
CN202010329359.9 2020-04-23

Publications (1)

Publication Number Publication Date
WO2021212661A1 true WO2021212661A1 (zh) 2021-10-28

Family

ID=72433829

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/099312 WO2021212661A1 (zh) 2020-04-23 2020-06-30 运行系统构建方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN111679893A (zh)
WO (1) WO2021212661A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114024759A (zh) * 2021-11-09 2022-02-08 北京天融信网络安全技术有限公司 安全策略管控方法、装置、计算机设备和介质
CN114379322A (zh) * 2022-01-18 2022-04-22 上汽通用五菱汽车股份有限公司 车载空调工作模式的自定义设置方法、装置、设备及介质
CN114944987A (zh) * 2022-05-23 2022-08-26 南京雨智源信息科技有限公司 一种通信设备的运行参数即时更新方法及通信设备
CN116150765A (zh) * 2023-02-28 2023-05-23 上海安般信息科技有限公司 一种基于api依赖的模糊变异方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150205624A1 (en) * 2013-12-23 2015-07-23 Emc Corporation Configuring a data center
CN107306201A (zh) * 2016-04-22 2017-10-31 华为技术有限公司 虚拟化网络的部署方法和部署系统
CN107943515A (zh) * 2017-12-14 2018-04-20 郑州云海信息技术有限公司 一种云管理平台管理服务编排模板的方法和装置
CN109828840A (zh) * 2018-12-29 2019-05-31 东软集团股份有限公司 资源编排方法、装置、存储介质及电子设备
CN110019835A (zh) * 2017-11-06 2019-07-16 阿里巴巴集团控股有限公司 资源编排方法、装置以及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150205624A1 (en) * 2013-12-23 2015-07-23 Emc Corporation Configuring a data center
CN107306201A (zh) * 2016-04-22 2017-10-31 华为技术有限公司 虚拟化网络的部署方法和部署系统
CN110019835A (zh) * 2017-11-06 2019-07-16 阿里巴巴集团控股有限公司 资源编排方法、装置以及电子设备
CN107943515A (zh) * 2017-12-14 2018-04-20 郑州云海信息技术有限公司 一种云管理平台管理服务编排模板的方法和装置
CN109828840A (zh) * 2018-12-29 2019-05-31 东软集团股份有限公司 资源编排方法、装置、存储介质及电子设备

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114024759A (zh) * 2021-11-09 2022-02-08 北京天融信网络安全技术有限公司 安全策略管控方法、装置、计算机设备和介质
CN114024759B (zh) * 2021-11-09 2024-02-02 北京天融信网络安全技术有限公司 安全策略管控方法、装置、计算机设备和介质
CN114379322A (zh) * 2022-01-18 2022-04-22 上汽通用五菱汽车股份有限公司 车载空调工作模式的自定义设置方法、装置、设备及介质
CN114944987A (zh) * 2022-05-23 2022-08-26 南京雨智源信息科技有限公司 一种通信设备的运行参数即时更新方法及通信设备
CN114944987B (zh) * 2022-05-23 2024-04-12 西安韵通网络科技有限公司 一种通信设备的运行参数即时更新方法及通信设备
CN116150765A (zh) * 2023-02-28 2023-05-23 上海安般信息科技有限公司 一种基于api依赖的模糊变异方法及装置
CN116150765B (zh) * 2023-02-28 2023-08-04 上海安般信息科技有限公司 一种基于api依赖的模糊变异方法及装置

Also Published As

Publication number Publication date
CN111679893A (zh) 2020-09-18

Similar Documents

Publication Publication Date Title
WO2021212661A1 (zh) 运行系统构建方法、装置、电子设备及存储介质
CN104391934B (zh) 数据校验方法和装置
WO2019169723A1 (zh) 测试用例选择方法、装置、设备以及计算机可读存储介质
US10824345B2 (en) Systems and methods for storing object state on hash chains
US11010287B1 (en) Field property extraction and field value validation using a validated dataset
TW201439792A (zh) 資料庫訪問系統及方法
CN107330014B (zh) 一种数据表的创建方法与设备
WO2021249356A1 (zh) 表单数据校验方法、系统、服务器和用户终端
CN111582405A (zh) 一种数据标注方法及装置
CN112052157B (zh) 测试报文的构造方法、装置及系统
WO2024002092A1 (zh) 视频的推送方法、装置和存储介质
WO2024011994A1 (en) Methods and systems for updating an algorithm package
CN110516258B (zh) 数据校验方法及装置、存储介质、电子装置
CN115617594B (zh) 用于生成激励信息的方法、装置、存储介质及程序产品
CN111507405A (zh) 图片标注方法、装置、电子设备及计算机可读存储介质
CN112099879B (zh) 配置信息管理方法、装置、计算机设备及存储介质
CN113722321A (zh) 数据导出方法、装置和电子设备
CN114090060A (zh) 网页配置方法、装置、终端设备以及可读存储介质
CN113419801A (zh) 表单渲染方法、终端、装置和计算机可读存储介质
CN109783134B (zh) 前端页面配置方法、装置及电子设备
CN110990278A (zh) 一种测试方法及装置
CN112800185B (zh) 移动终端中界面结点的匹配文本生成、匹配方法及装置
US11816424B2 (en) Conditional save of draft enabled business objects
CN113971051B (zh) 基于插件的开发方法、装置及存储介质
CN109669944B (zh) 表单修改方法、装置、存储介质和电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20931777

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20931777

Country of ref document: EP

Kind code of ref document: A1