Component configuration processing method, component release platform, device and storage medium
By checksum conversion processing of the release component package, the problems of high learning cost of component development and uncontrollable development costs in the prior art are solved, and the standardization and security of component packages are realized, reducing development complexity and accelerating development efficiency.
Patent Information
- Application Number
- CN202411668437.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, the learning cost of component development is relatively high, and there are problems such as development cycle and uncontrollable development costs.
Provides a component configuration processing method, which reduces learning costs and development complexity by obtaining component packages to be published, performing verification and conversion processing on them, so as to adapt them to the component publishing platform.
Through checksum conversion processing, the standardization and security of component packages are ensured, which reduces the learning cost and development complexity of users during component development, and accelerates the development efficiency of components.
Smart Images

Figure CN119576317A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a component configuration processing method, a component publishing platform, a device and a storage medium. Background Art
[0002] A component is an independent, reusable module or part in software system development, which can be used to build a software system. Component development is the basis of software and system development, and how to achieve efficient component development has become a very important issue.
[0003] In the prior art, users generally directly use components provided by the platform. If the components provided by the platform do not meet the actual usage requirements of the users, the users need to develop components according to the component development method provided by the platform.
[0004] However, this method requires users to learn the component development rules of the platform, and the component development rules of different platforms may be different. Therefore, the learning cost of component development is high, and there are problems with uncontrollable development cycle and development cost. Summary of the invention
[0005] The purpose of this application is to provide a component configuration processing method, component publishing platform, device and storage medium to address the deficiencies in the above-mentioned prior art, so as to solve the problems in the prior art that the learning cost of component development is high, and there are uncontrollable development cycles and development costs.
[0006] To achieve the above objectives, the technical solutions adopted in this application are as follows:
[0007] In a first aspect, the present application provides a component configuration processing method, the method comprising:
[0008] Obtain a component package of a component to be released, wherein the component package includes: static resource information, component code, and configuration item information;
[0009] Performing verification processing on the component package to obtain a verification result of the component package;
[0010] Determining whether to perform component conversion processing on the component package according to the verification result;
[0011] If yes, convert the component package to obtain online resource information of the component package for the component publishing platform and converted configuration item information;
[0012] The component package is published on the component publishing platform based on the component code, the online resource information and the converted configuration item information.
[0013] Optionally, the performing verification processing on the component package to obtain a verification result of the component code includes:
[0014] Performing a reference library check on the component package to obtain a reference library check result of the component package;
[0015] Performing syntax checking on the component code of the component package to obtain a syntax checking result of the component package;
[0016] Performing a security check on the component package according to a preset security rule to obtain a security check result of the component package;
[0017] Performing verification processing on the static resources in the component package to obtain a static resource verification result of the component package;
[0018] Verifying the configuration item information in the component package according to a preset configuration information conversion table to obtain a configuration item information verification result of the component package;
[0019] The reference library verification result, the syntax verification result, the security verification result, the static resource verification result and the configuration item information verification result are used as the verification result of the component package.
[0020] Optionally, determining whether to perform component conversion processing on the component package according to the verification result includes:
[0021] If the reference library verification result indicates that the component package references the library correctly, and the syntax verification result indicates that the component code syntax is correct, and the static resource verification result indicates that the static resources of the component package can be converted into online resources, and the security verification result indicates that the component package complies with preset security rules, and the configuration item verification result indicates that the configuration item information is all included in the configuration information conversion table, then it is determined to perform component conversion processing on the component package.
[0022] Optionally, the converting the component package to obtain online resource information of the component package for the component publishing platform and converted configuration item information includes:
[0023] Scanning the component package to obtain static resources of the component package and access codes of each static resource;
[0024] Performing online processing on each of the static resources and the access code of each of the static resources to obtain online resource information of the component package for the component publishing platform;
[0025] Perform configuration item conversion processing on the component package to obtain converted configuration item information of the component package.
[0026] Optionally, the performing online processing on each of the static resources and the access code of each of the static resources to obtain online resource information of the component package for the component publishing platform includes:
[0027] Storing each of the static resources in an online resource library of the component publishing platform;
[0028] Determine the access address of each access code, and change the access address of the access code of each static resource to the online address of the online resource corresponding to the static resource;
[0029] Each of the static resources and the online address of each of the static resources is used as the online resource information of the component package.
[0030] Optionally, performing configuration item conversion processing on the component package to obtain converted configuration item information of the component package includes:
[0031] Extracting configuration items from the component package to obtain at least one configuration item information of the component package;
[0032] The configuration item information is converted according to a preset configuration information conversion table to obtain converted configuration item information of each configuration item. The configuration information conversion table stores each configuration item information in the component package and converted configuration item information corresponding to each configuration item information.
[0033] Optionally, the method further comprises:
[0034] In response to a configuration parameter modification instruction from a user for a target component, determining target configuration item information corresponding to the configuration parameter modification instruction;
[0035] In the configuration information conversion table, the value of the target configuration item information is modified to the parameter value indicated by the configuration parameter modification instruction.
[0036] In a second aspect, the present application provides a component publishing platform, the platform comprising:
[0037] The acquisition module is used to acquire the component package of the component to be released, wherein the component package includes: static resource information, component code and configuration item information;
[0038] A verification module, used to perform verification processing on the component package to obtain a verification result of the component package;
[0039] A determination module, used to determine whether to perform component conversion processing on the component package according to the verification result;
[0040] A conversion module, used to convert the component package to obtain online resource information of the component package for the component publishing platform and converted configuration item information;
[0041] A publishing module is used to publish the component package on the component publishing platform based on the component code, the online resource information and the converted configuration item information.
[0042] Optionally, the verification module is specifically used to:
[0043] Performing a reference library check on the component package to obtain a reference library check result of the component package;
[0044] Performing syntax checking on the component code of the component package to obtain a syntax checking result of the component package;
[0045] Performing a security check on the component package according to a preset security rule to obtain a security check result of the component package;
[0046] Performing verification processing on the static resources in the component package to obtain a static resource verification result of the component package;
[0047] Verifying the configuration item information in the component package according to a preset configuration information conversion table to obtain a configuration item information verification result of the component package;
[0048] The reference library verification result, the syntax verification result, the security verification result, the static resource verification result and the configuration item information verification result are used as the verification result of the component package.
[0049] Optionally, the determining module is specifically used to:
[0050] If the reference library verification result indicates that the component package references the library correctly, and the syntax verification result indicates that the component code syntax is correct, and the static resource verification result indicates that the static resources of the component package can be converted into online resources, and the security verification result indicates that the component package complies with preset security rules, and the configuration item verification result indicates that the configuration item information is all included in the configuration information conversion table, then it is determined to perform component conversion processing on the component package.
[0051] Optionally, the conversion module is specifically used to:
[0052] Scanning the component package to obtain static resources of the component package and access codes of each static resource;
[0053] Performing online processing on each of the static resources and the access code of each of the static resources to obtain online resource information of the component package for the component publishing platform;
[0054] Perform configuration item conversion processing on the component package to obtain converted configuration item information of the component package.
[0055] Optionally, the conversion module is specifically used to:
[0056] Storing each of the static resources in an online resource library of the component publishing platform;
[0057] Determine the access address of each access code, and change the access address of the access code of each static resource to the online address of the online resource corresponding to the static resource;
[0058] Each of the static resources and the online address of each of the static resources is used as the online resource information of the component package.
[0059] Optionally, the conversion module is specifically used to:
[0060] Extracting configuration items from the component package to obtain at least one configuration item information of the component package;
[0061] The configuration item information is converted according to a preset configuration information conversion table to obtain converted configuration item information of each configuration item. The configuration information conversion table stores each configuration item information in the component package and converted configuration item information corresponding to each configuration item information.
[0062] Optionally, the device further comprises a modification module, configured to:
[0063] In response to a configuration parameter modification instruction from a user for a target component, determining target configuration item information corresponding to the configuration parameter modification instruction;
[0064] In the configuration information conversion table, the value of the target configuration item information is modified to the parameter value indicated by the configuration parameter modification instruction.
[0065] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of a component configuration processing method as described in any one of the first aspects.
[0066] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a component configuration processing method as described in any one of the first aspects are executed.
[0067] The beneficial effect of the present application is that after uploading the component package to the component publishing platform, the component publishing platform can verify the component package to ensure the standardization and security of the component package, and convert the component package to make it easier to expand and migrate the component package. Compared with the prior art, the present application does not restrict the development tools and development languages of the user to develop components, thereby reducing the learning cost of the user to develop components and accelerating the development efficiency of components.
[0068] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0070] Figure 1 A schematic diagram showing an application scenario provided by an embodiment of the present application is shown;
[0071] Figure 2 A flowchart of a component configuration processing method provided by an embodiment of the present application is shown;
[0072] Figure 3 A flowchart of checking a component package provided by an embodiment of the present application is shown;
[0073] Figure 4 A flowchart of converting a component package provided by an embodiment of the present application is shown;
[0074] Figure 5 A flowchart of performing online processing of resources provided by an embodiment of the present application is shown;
[0075] Figure 6 A flowchart for performing configuration item conversion provided by an embodiment of the present application is shown;
[0076] Figure 7 A flowchart for modifying configuration item parameters provided by an embodiment of the present application is shown;
[0077] Figure 8 A schematic diagram showing a display interface of a component publishing platform provided in an embodiment of the present application is shown;
[0078] Fig. 9 A schematic diagram of the structure of a component publishing platform provided in an embodiment of the present application is shown;
[0079] Fig.10 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0080] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0081] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0082] In the prior art, when developing software systems, users generally directly use components provided by the development platform, but the components provided by the development platform may not meet the actual usage needs of users. If users need to develop components themselves, the existing development platform also allows users to upload custom developed components, but users are required to develop components based on the component development rules of the platform.
[0083] Since component development rules of different platforms are different, users need to learn the component development rules of different platforms when developing components. This increases the learning and development costs for users during the component development process and also affects the development cycle and development cost of the entire software system.
[0084] Based on this, this application proposes a component configuration processing method, which enables the platform to identify the components custom developed by users by verifying and converting the custom components uploaded by users. This allows users to not be restricted by the component development rules of the platform, and users can use their familiar development tools and development languages to develop components, which also reduces the learning cost of component development.
[0085] The component configuration processing method of the present application can be applied to a component publishing platform. Figure 1This is a schematic diagram of an application scenario given in this application. After the user completes component development in other development platforms or development tools, the component package can be uploaded to the component publishing platform. The component publishing platform can verify and convert the component package based on the method of this application, so that the component package can be adapted to the component publishing platform. The component publishing platform can be connected to the component application platform. After the component is verified and converted based on the component publishing platform, the component can be sent to the component application platform for application. The component application platform can be a platform for users to develop software systems.
[0086] Among them, the component publishing platform can run on an electronic device with a display interface. After the component package is verified and converted, the component publishing platform can display the display effect and configuration items of the component on the display interface, and modify the component based on the user's modification instructions for the component. The component publishing platform, component application platform and development tools can be deployed on the same device or on different devices respectively, and this application does not limit this.
[0087] The following is a further description of the configuration processing method of this application component. Figure 2 As shown, the method includes:
[0088] S201. Obtain a component package of a component to be released, wherein the component package includes: static resource information, component code, and configuration item information.
[0089] The component package to be released can be an SDK (Software Development Kit) file of a component custom-developed by a user. The user can develop a component using a component development tool in any development language, develop and debug the component, obtain the SDK file of the component to be released as a component package, and upload the component package of the component to be released to the component release platform.
[0090] The component publishing platform can verify the component packages of the components to be published uploaded by the users, and convert the component packages of the components to be published into component packages that can be recognized by the applications connected to the platform.
[0091] The static resource information of the component may be image resources, music resources, video resources, etc. in the local library referenced by the component. The configuration item information of the component includes the configuration items of the component and the field values of each configuration item, such as the font setting, data setting, location setting, etc. The component code of the component may be written by the developer using a development language.
[0092] S202: Verify the component package to obtain a verification result of the component package.
[0093] Verify the component package, including verifying the component package for compliance, determining whether there are syntax errors, library reference errors, resource reference errors, non-standard configuration items in the component package, and determining whether there are security threats in the component package.
[0094] The verification results of the component package include: the reference library verification results, syntax verification results, security verification results, static resource verification results, and configuration item verification results of the component package. It should be understood that this application only uses the above verification results as examples for illustration, and those skilled in the art can also perform other verification processing on the component package based on the above verification results to further ensure the availability and security of the component package.
[0095] S203: Determine whether to perform component conversion processing on the component package according to the verification result.
[0096] If the verification result indicates that the component package is available and the verification is correct, the component publishing platform can convert the component package to obtain the converted component package. The verification result that there is no problem includes: the component package reference library verification passed, syntax verification passed, security verification passed, static resource verification passed, and configuration item verification passed.
[0097] If the verification result indicates that there is a problem with the component package, the component publishing platform can output the problem of the component package to the user through a display interface to prompt the user to correct the problem in the component package, and re-check the component package for compliance and security when the user corrects the component package and resubmits the component package.
[0098] S204: If yes, convert the component package to obtain online resource information of the component package for the component publishing platform and converted configuration item information.
[0099] The component publishing platform may include an online resource library for storing resource files referenced by each component package.
[0100] The component package is converted by storing the local resource files referenced by the component package in an online resource library of the component publishing platform to ensure that the resource references are correct when the component package is used.
[0101] In the first implementation method of converting the configuration item information in the component package, the configuration item information in the component packages developed by different development tools can be converted into the configuration item information unified by the component publishing platform. Different development tools may have different field name definitions for the configuration item information. The field name definition of the configuration item information of each development tool can be extracted, and a mapping relationship can be established between the field name definitions representing the same meaning in each development tool and the field name definitions in the component publishing platform, so as to convert the configuration item information of different development tools into the configuration item information of the component publishing platform.
[0102] For example, assuming that the field name for the component position setting in development tool 1 is defined as "position", and the field name for the component position setting in development tool 2 is defined as "component position", the component publishing platform can convert the configuration item information in the component packages developed by development tool 1 and development tool 2, and convert both "position" and "component position" into "position".
[0103] In the second implementation method of converting the configuration item information in the component package, the configuration item information of the component package to be released can be extracted, and a list of the configuration item information of the component can be generated. By scanning and identifying the component code, the field name information and field values of multiple configuration items in the component package to be released can be obtained, and the field name information and field values of the configuration items can be stored as a list of the configuration item information of the component to be released. When the configuration of the component is changed, the component publishing platform can find the corresponding field in the configuration item information list based on the modification instruction input by the user, and modify the field value corresponding to the field.
[0104] S205: Publishing a component package on a component publishing platform based on the component code, online resource information, and converted configuration item information.
[0105] After completing the conversion process of the component package to be released, the converted component code, online resource information and converted configuration item information can be combined to obtain a new component package to be released, and the new component package to be released is released on the component release platform.
[0106] It should be noted that after the component package to be released is converted, the component code is also changed. For example, the code about resource reference in the component code may change. Therefore, the component code in the component package to be released can be replaced with the converted component code to obtain a new component package to be released.
[0107] In an embodiment of the present application, a component package of a component to be released is obtained, the component package including: static resource information, component code and configuration item information, the component package is verified to obtain a verification result of the component package, and based on the verification result, it is determined whether to perform component conversion on the component package, and if so, the component package is converted to obtain online resource information of the component package for a component publishing platform and converted configuration item information, and based on the component code, the online resource information and the converted configuration item information, the component package is published on the component publishing platform.
[0108] After uploading the component package to the component publishing platform, the component publishing platform can verify the component package to ensure the standardization and security of the component package, and convert the component package to make it easier to expand and migrate. Compared with the prior art, this application does not restrict the development tools and development languages of user-developed components, thereby reducing the learning cost of user-developed components and accelerating the development efficiency of components.
[0109] The following is a further description of the verification result of the component code obtained by verifying the component package in the above step S202. Figure 3 As shown, the step includes:
[0110] S301, perform reference library verification on the component package to obtain the reference library verification result of the component package.
[0111] The reference library verification result of the component package is used to indicate whether the component library referenced by the component package complies with the component library standard.
[0112] S302: Perform syntax check on the component code of the component package to obtain a syntax check result of the component package.
[0113] The syntax check result is used to indicate whether the component code of the component package is executable code. The syntax check of the component code may be preprocessing verification by static code scanning and precompilation of the component code of the component package to ensure that the component code of the component package is executable code.
[0114] S303: Perform security verification on the component package according to preset security rules to obtain a security verification result of the component package.
[0115] The component publishing platform can scan the component package to determine whether there are viruses or other risk points that may cause user information leakage in the component package. The security verification result is used to indicate whether there are risk points or viruses in the component package.
[0116] S304: Verify the static resources in the component package to obtain a verification result of the static resources in the component package.
[0117] The static resource verification result can indicate whether the resources referenced in the component package can be converted into online resources. The verification process of the static resources in the component package can be to scan the static resources referenced by the component package to determine whether the format of the static resources is convertible into an online resource format, such as pictures, videos, files, etc.
[0118] S305: Verify the configuration item information in the component package according to a preset configuration information conversion table to obtain a configuration item information verification result of the component package.
[0119] The configuration item information conversion table can pre-store the configuration item information defined in the component package's development tool. By comparing the configuration item information in the component package with the configuration item information in the configuration item information conversion table, it is possible to determine the configuration item information that does not exist in the configuration item information conversion table and is unrecognizable by the component publishing platform, and remove the unrecognizable configuration item information.
[0120] The configuration item information verification result may indicate the configuration item information that has passed the verification and is contained in the configuration information conversion table in the component package.
[0121] S306: Use the reference library verification result, syntax verification result, security verification result, static resource verification result and configuration item information verification result as the verification result of the component package.
[0122] After the component package is verified, all verification results with abnormalities can be output to the user so that the user can correct the abnormal parts.
[0123] The following is a further explanation of determining whether to perform component conversion processing on the component package based on the verification result, including:
[0124] If the reference library verification result indicates that the component package references the library correctly, and the syntax verification result indicates that the component code syntax is correct, and the static resource verification result indicates that the static resources of the component package can be converted into online resources, and the security verification result indicates that the component package complies with the preset security rules, and the configuration item verification result indicates that the configuration item information is all included in the configuration information conversion table, then it is determined that the component package is to be subjected to component conversion processing.
[0125] If the reference library verification result indicates that the component library referenced by the component package meets the preset standards, and the syntax verification result indicates that the component code in the component package has no syntax errors, and the static resource verification result indicates that the resources referenced by the component package can be converted into online resources, and the security verification result indicates that the component package has no security threats, and after the configuration items in the component package that do not exist in the configuration information conversion table are removed, the component package can be converted based on the above-mentioned S204 step.
[0126] On the contrary, if the reference library of the component does not meet the standard, or there are syntax errors in the component code, or there are resources referenced by the component that cannot be converted into online resources, or there are security threats in the component package, or there is configuration item information in the component package that cannot be removed and is not included in the configuration information conversion table, the component package will not be converted.
[0127] The following is a further description of the above conversion process of the component package to obtain the online resource information of the component package for the component release platform and the configuration item information after conversion, such as Figure 4 As shown, the above step S204 includes:
[0128] S401, scanning the component package to obtain static resources of the component package and access codes of each static resource.
[0129] The access code of the static resource may be a code in the component code of the component package that references the static resource, and the access code includes an access path of the static resource.
[0130] After scanning the component code of the component package, the access path of the referenced resource in the component code can be obtained, and the static resource of the component package is obtained from the local library based on the access path.
[0131] S402: Perform online processing on each static resource and the access code of each static resource to obtain online resource information of the component package for the component publishing platform.
[0132] The component publishing platform can store static resources in an online resource library, and change the access codes in the static resources, and use the static resources stored in the online resource library and the changed access codes as the online resource information of the component package for the component publishing platform.
[0133] S403: Perform configuration item conversion processing on the component package to obtain converted configuration item information of the component package.
[0134] The configuration item conversion process for the component package may be to replace the fields of the configuration item information in the component package based on the configuration information conversion table, and convert the configuration item information into the configuration item information uniformly defined by the component publishing platform.
[0135] The following is a further description of the above-mentioned online processing of each static resource and the access code of each static resource to obtain the online resource information of the component package for the component publishing platform, such as Figure 5 As shown, the above step S402 includes:
[0136] S501. Store each static resource in an online resource library of a component publishing platform.
[0137] After the component publishing platform obtains the static resources from the local library based on the access address in the component code, the static resources can be stored in the online resource library of the component publishing platform, so that the platform can display and modify the components independently of the local library.
[0138] S502: Determine the access address of each access code, and change the access address of the access code of each static resource to the online address of the online resource corresponding to the static resource.
[0139] S503: Use each static resource and its online address as online resource information of the component package.
[0140] The online address of the online resource may be a storage path of the online resource in the online resource library, or a unique identifier of the online resource in the online resource library. The online resource refers to a static resource stored in the online resource library.
[0141] As a possible implementation, the component publishing platform may scan the access addresses one by one, store the static resources of the access addresses in the online resource library, and change the access address in the access code to the storage address of the static resources in the online resource library.
[0142] In another possible implementation, after scanning the access address in the component code, the static resource of the access address is stored in the online resource library. The access address of the component code can be used as the identification information of the online resource. When changing the access address, the access address can be compared with the identification information of each online resource in the online resource library, and the access address can be replaced with the storage address of the online resource corresponding to the matched identification information.
[0143] In the embodiment of the present application, by performing online processing of static resources, the component publishing platform can be made faster in using components, and when service expansion and service migration are required, the efficiency of expansion and migration can also be improved.
[0144] The following is a further description of the above configuration item conversion process for the component package to obtain the converted configuration item information of the component package, such as Figure 6 As shown, the above step S403 includes:
[0145] S601: extract configuration items from a component package to obtain at least one configuration item information of the component package.
[0146] In a possible implementation, character matching may be performed between the component code in the component package and the configuration item information in the configuration information conversion table of the component publishing platform to obtain the configuration item information defined in the component code.
[0147] S602: Convert each configuration item information according to the configuration information conversion table to obtain converted configuration item information of each configuration item. The configuration information conversion table stores each configuration item information in the component package and converted configuration item information corresponding to each configuration item information.
[0148] Optionally, a mapping relationship can be pre-established between the configuration item information of the development tool and the configuration item information in the component publishing platform, and the configuration item information in the development tool and the configuration item information in the component publishing platform that have a mapping relationship can be used as an item in the configuration information conversion table, and the configuration item information in the component publishing platform can be used as the converted configuration item information corresponding to the configuration item information of the development tool.
[0149] By matching the configuration item information of the component package with the configuration item information in the configuration information conversion table, the target item corresponding to the configuration item information in the component package in the configuration information conversion table can be determined, and the configuration information of the component publishing platform in the target item can be used as the converted configuration item information corresponding to the configuration item information.
[0150] By converting the configuration item information of the component package, the form of the configuration item information in different development tools can be unified, thereby reducing the difficulty of managing the component development platform and reducing the difficulty of subsequent system development.
[0151] As another possible implementation, the component publishing platform may also directly extract configuration items from the component package, use the extracted configuration items, their types, and their field values as configuration item information, and save the configuration item information as a configuration information conversion table for the component package.
[0152] In this application, users can also modify components in the component publishing platform, such as Figure 7 As shown, the method of the present application also includes:
[0153] S701. In response to a configuration parameter modification instruction from a user for a target component, determine target configuration item information corresponding to the configuration parameter modification instruction.
[0154] Figure 8 This is a schematic diagram of a display interface of a component publishing platform provided in this application. Figure 8 , the preview display effect of the component is displayed in area 801, the currently selected configuration item information is displayed in area 802, and the field value of each configuration item information is displayed in area 803. After the user selects the configuration item to be modified in area 803, the value of the selected configuration item can be modified in area 802. After the user submits the modified value of the configuration item, the platform front end generates a configuration parameter modification instruction, and the platform back end can modify the value of the configuration item in the configuration information conversion table based on the configuration parameter modification instruction.
[0155] The configuration parameter modification instruction includes the configuration item to be modified and the modified value of the configuration item. After receiving the configuration parameter modification instruction from the user for the target component, the configuration parameter modification instruction can be parsed and the configuration item contained therein can be used as the target configuration item information.
[0156] S702: Modify the value of the target configuration item information in the configuration information conversion table to the parameter value indicated by the configuration parameter modification instruction.
[0157] Table 1 is part of the configuration information conversion table provided in this application, which includes configuration items, values of configuration items, and types of configuration items. Figure 8If the user selects the configuration item "Label Name" of component A and enters "User 123" in area 802, the value of the configuration item "Label Name" in Table 1 can be changed to "User 123".
[0158] Table 1 Configuration information conversion table example (partial content)
[0159]
[0160] In an embodiment of the present application, after completing component development, the user can upload the component package of the component to the component publishing platform. After the component publishing platform performs a compliance check and a security check on the component package, the static resources in the component package are extracted and processed online, and the configuration items in the component package are extracted and converted to obtain a converted component package, and the converted component package is used as the final published component package.
[0161] Based on the same inventive concept, the embodiment of the present application also provides a component publishing platform corresponding to the component configuration processing method. Since the principle of solving the problem by the platform in the embodiment of the present application is similar to the above-mentioned component configuration processing method in the embodiment of the present application, the implementation of the platform can refer to the implementation of the method, and the repeated parts will not be repeated.
[0162] Fig. 9 A structural diagram of a component publishing platform provided in an embodiment of the present application is shown.
[0163] The acquisition module 901 is used to acquire the component package of the component to be released, and the component package includes: static resource information, component code and configuration item information;
[0164] Verification module 902, used to perform verification processing on the component package to obtain the verification result of the component package;
[0165] A determination module 903 is used to determine whether to perform component conversion processing on the component package according to the verification result;
[0166] The conversion module 904 is used to convert the component package to obtain the online resource information of the component package for the component publishing platform and the converted configuration item information;
[0167] The publishing module 905 is used to publish the component package on the component publishing platform based on the component code, online resource information and converted configuration item information.
[0168] Optionally, the verification module 902 is specifically used for:
[0169] Perform reference library verification on the component package to obtain the reference library verification result of the component package;
[0170] Performing syntax check on the component code of the component package to obtain the syntax check result of the component package;
[0171] Performing security verification on the component package according to preset security rules to obtain a security verification result of the component package;
[0172] Verify the static resources in the component package to obtain the static resource verification result of the component package;
[0173] Verify the configuration item information in the component package according to the preset configuration information conversion table to obtain the configuration item information verification result of the component package;
[0174] The reference library verification results, syntax verification results, security verification results, static resource verification results, and configuration item information verification results are used as the verification results of the component package.
[0175] Optionally, the determination module 903 is specifically configured to:
[0176] If the reference library verification result indicates that the component package references the library correctly, and the syntax verification result indicates that the component code syntax is correct, and the static resource verification result indicates that the static resources of the component package can be converted into online resources, and the security verification result indicates that the component package complies with the preset security rules, and the configuration item verification result indicates that the configuration item information is all included in the configuration information conversion table, then it is determined that the component package is to be subjected to component conversion processing.
[0177] Optionally, the conversion module 904 is specifically configured to:
[0178] Scan the component package to obtain the static resources of the component package and the access code of each static resource;
[0179] Perform online processing on each static resource and the access code of each static resource to obtain online resource information of the component package for the component publishing platform;
[0180] Perform configuration item conversion processing on the component package to obtain converted configuration item information of the component package.
[0181] Optionally, the conversion module 904 is specifically configured to:
[0182] Store each static resource in the online resource library of the component publishing platform;
[0183] Determine the access address of each access code, and change the access address of the access code of each static resource to the online address of the online resource corresponding to the static resource;
[0184] Each static resource and its online address are used as the online resource information of the component package.
[0185] Optionally, the conversion module 904 is specifically configured to:
[0186] Extracting configuration items from the component package to obtain at least one configuration item information of the component package;
[0187] Each configuration item information is converted according to a preset configuration information conversion table to obtain converted configuration item information of each configuration item. The configuration information conversion table stores each configuration item information in the component package and converted configuration item information corresponding to each configuration item information.
[0188] Optionally, the device further comprises a modification module, configured to:
[0189] In response to a configuration parameter modification instruction from a user for a target component, determining target configuration item information corresponding to the configuration parameter modification instruction;
[0190] In the configuration information conversion table, the value of the target configuration item information is modified to the parameter value indicated by the configuration parameter modification instruction.
[0191] After uploading the component package to the component publishing platform in the embodiment of the present application, the component publishing platform can verify the component package to ensure the standardization and security of the component package, and convert the component package to make it easier to expand and migrate the component package. Compared with the prior art, the present application does not restrict the development tools and development languages of the user to develop components, thereby reducing the learning cost of the user to develop components and accelerating the development efficiency of components.
[0192] Fig.10 A structural schematic diagram of an electronic device provided in an embodiment of the present application is shown, including: a processor 1001, a storage medium 1002 and a bus 1003, wherein the storage medium 1002 stores machine-readable instructions executable by the processor 1001, and when the electronic device runs a component configuration processing method such as in the embodiment, the processor 1001 communicates with the storage medium 1002 via the bus 1003, and the processor 1001 executes the machine-readable instructions, and the processor 1001 executes the preamble of the method item to execute the steps in the component configuration processing method.
[0193] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program is executed when a processor is running, and the processor executes the steps in the component configuration processing method.
[0194] In the embodiment of the present application, the computer program can also execute other machine-readable instructions when run by the processor to execute other methods described in the embodiment. For the specific execution method steps and principles, please refer to the description of the embodiment, which will not be repeated here.
[0195] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0196] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0197] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0198] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A component configuration processing method, characterized in that: Applied to component publishing platforms, including: Obtain a component package of a component to be released, wherein the component package includes: static resource information, component code, and configuration item information; Performing verification processing on the component package to obtain a verification result of the component package; Determining whether to perform component conversion processing on the component package according to the verification result; If yes, convert the component package to obtain online resource information of the component package for the component publishing platform and converted configuration item information; The component package is published on the component publishing platform based on the component code, the online resource information and the converted configuration item information.
2. The method according to claim 1, characterized in that The verifying the component package to obtain the verification result of the component code includes: Performing a reference library check on the component package to obtain a reference library check result of the component package; Performing syntax checking on the component code of the component package to obtain a syntax checking result of the component package; Performing a security check on the component package according to a preset security rule to obtain a security check result of the component package; Performing verification processing on the static resources in the component package to obtain a static resource verification result of the component package; Verifying the configuration item information in the component package according to a preset configuration information conversion table to obtain a configuration item information verification result of the component package; The reference library verification result, the syntax verification result, the security verification result, the static resource verification result and the configuration item information verification result are used as the verification result of the component package.
3. The method according to claim 2, characterized in that The step of determining whether to perform component conversion processing on the component package according to the verification result includes: If the reference library verification result indicates that the component package references the library correctly, and the syntax verification result indicates that the component code syntax is correct, and the static resource verification result indicates that the static resources of the component package can be converted into online resources, and the security verification result indicates that the component package complies with preset security rules, and the configuration item verification result indicates that the configuration item information is all included in the configuration information conversion table, then it is determined to perform component conversion processing on the component package.
4. The method according to claim 1, characterized in that: The converting process of the component package to obtain online resource information of the component package for the component publishing platform and converted configuration item information includes: Scanning the component package to obtain static resources of the component package and access codes of each static resource; Performing online processing on each of the static resources and the access code of each of the static resources to obtain online resource information of the component package for the component publishing platform; Perform configuration item conversion processing on the component package to obtain converted configuration item information of the component package.
5. The method according to claim 4, characterized in that The online processing of each of the static resources and the access code of each of the static resources to obtain the online resource information of the component package for the component publishing platform includes: Storing each of the static resources in an online resource library of the component publishing platform; Determine the access address of each access code, and change the access address of the access code of each static resource to the online address of the online resource corresponding to the static resource; Each of the static resources and the online address of each of the static resources is used as the online resource information of the component package.
6. The method according to claim 4, characterized in that The performing configuration item conversion processing on the component package to obtain converted configuration item information of the component package includes: Extracting configuration items from the component package to obtain at least one configuration item information of the component package; The configuration item information is converted according to a preset configuration information conversion table to obtain converted configuration item information of each configuration item. The configuration information conversion table stores each configuration item information in the component package and converted configuration item information corresponding to each configuration item information.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: In response to a configuration parameter modification instruction from a user for a target component, determining target configuration item information corresponding to the configuration parameter modification instruction; In the configuration information conversion table, the value of the target configuration item information is modified to the parameter value indicated by the configuration parameter modification instruction.
8. A component publishing platform, characterized in that: include: The acquisition module is used to acquire the component package of the component to be released, wherein the component package includes: static resource information, component code and configuration item information; A verification module, used to perform verification processing on the component package to obtain a verification result of the component package; A determination module, used to determine whether to perform component conversion processing on the component package according to the verification result; A conversion module, used to convert the component package to obtain online resource information of the component package for the component publishing platform and converted configuration item information; A publishing module is used to publish the component package on the component publishing platform based on the component code, the online resource information and the converted configuration item information.
9. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of a component configuration processing method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the component configuration processing method as claimed in any one of claims 1 to 7 are executed.
