Component package integration detection method, marking method, platform and electronic device
By uniformly assigning identification information to component packages, the problem of inconsistent marking rules in component integration detection is solved, and efficient and accurate component package integration detection and management are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2025-01-10
- Publication Date
- 2026-07-10
Smart Images

Figure CN122364059A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a component package integration detection method, marking method, platform, and electronic device. Background Technology
[0002] During the application development phase, developers can obtain the necessary components from a component marketplace and integrate them into the application's codebase. These components implement the application's functionalities, such as a calendar component. Afterward, the application developer compiles the integrated component's source code to obtain the application's package, thus completing the application development.
[0003] The integration of these components into the application (or application source code) allows component developers to understand how the components are being used, facilitating subsequent modifications and upgrades.
[0004] Currently, in the methods for detecting component integration, the detection platform mainly verifies the hash information, coordinate information and other markers of the components. However, before verification, the detection platform needs to spend a lot of effort to understand the marking rules of different component developers. However, the detection platform cannot fully understand the marking rules, which can easily lead to marking verification errors and affect the detection of component integration. Summary of the Invention
[0005] This application provides a component package integration detection method, marking method, platform, and electronic device, which eliminates the need for component developers to manually mark and configure component packages, reduces the problem of marking information conflicts caused by different marking rules of different developers, and allows users to clearly understand the integration status of each component package.
[0006] To achieve the above objectives, the embodiments of this application provide the following technical solutions:
[0007] Firstly, a component package integration detection method is provided. Taking the application of this method to a component package integration detection system as an example, the system includes a first platform and a second platform, wherein the first platform is used to provide at least one component package; and the second platform is used to provide a software package for at least one application. In this method, the first platform receives a first component package; the first platform generates identification information for the first component package, wherein the identification information is used to uniquely identify the first component package; the first platform writes the identification information into the configuration file of the first component package to obtain a second component package, wherein the second component package is used to integrate into a first application to implement a first function of the first application.
[0008] The second platform receives the software package of the first application; the second platform parses the software package to obtain a first file, wherein the first file includes a file after compiling the configuration file of the component package; the second platform obtains identification information based on the first file; if the identification information is successfully verified, the second platform determines that the first application has integrated the second component package corresponding to the identification information; the second platform then sends information to the first platform to indicate the integration status of the second component package in the application.
[0009] In the above method, the first platform, such as a component platform, component store, or component marketplace, can uniformly assign unique identifier information to the received component packages and write the identifier information into the component package's configuration file. This eliminates the need for component developers to manually mark and configure component packages, reducing conflicts caused by different developers' marking rules. During component package integration testing, the corresponding component package can be accurately identified based on the identifier information. Furthermore, it eliminates the need to understand the marking rules of each developer, significantly reducing workload and improving efficiency.
[0010] The first platform writes the identification information into the configuration file of the component package, or it can obtain the identification information from a fixed location in the component package.
[0011] Because the identification information of component packages is uniformly configured by the first platform, there are no conflicts between the identification information of different component packages. Therefore, second platforms, such as app stores and app markets, can more accurately determine the integration status of component packages based on the identification information obtained from the application packages. Furthermore, when performing testing, the second platform does not need to know the marking rules of each developer, greatly reducing workload and improving efficiency.
[0012] Furthermore, it is understood that the second component package can be any of the multiple component packages provided by the first platform, and the first application can be any of the multiple applications provided by the second platform. The second platform can perform component package integration detection for each application to determine which component packages are inherited by the application. The second platform then sends information indicating the integration status of the component packages in the application to the first platform. This allows component developers and other users on the first platform to understand the integration status of each component package, facilitating subsequent updates, modifications, and development of the component packages.
[0013] In one possible implementation of the first aspect, the identification information of the first component package includes first information. During the process of generating the identification information of the first component package, the first platform generates a first identifier for the first component package and concatenates the first identifier with first preset information to generate the first information of the first component package. The first identifier is used to indicate the first component package, and the first preset information is used to indicate the first information.
[0014] In the above implementation, the identifier information of the first component package can be generated by concatenating the first identifier with preset information. The first identifier can be a unique string generated specifically for the first component package, such as a string of numbers.
[0015] In one possible implementation of the first aspect, the identification information of the first component package further includes second information. When generating the identification information of the first component package, the first platform also concatenates the package information of the first component package with second preset information to generate the second information of the first component package. The package information indicates at least one of the name, type, and version number of the first component package, and the second preset information indicates the second information.
[0016] In the above implementation, the identification information can uniquely identify the first component package, and can also specifically describe the name, type, version number, etc. of the component package.
[0017] In one possible implementation of the first aspect, the first component package is a source code component package and the configuration file is a source code file; or, the first component package is a binary component package and the configuration file is a binary file.
[0018] In the above implementation, the first platform can write component package identification information to both source code files and binary files to identify the component package.
[0019] In one possible implementation of the first aspect, the first component package is a binary component package, and the configuration file is a binary file. During the process of obtaining the second component package by writing identification information into the configuration file, the first platform also writes identification information into the source code file after decompiling the configuration file to obtain the second component package.
[0020] In one possible implementation of the first aspect, after obtaining the second component package, the first platform signs the second component package to obtain signature information. Then, the first platform writes identification information into the signature information and saves the signature information with the identification information written into the second component package.
[0021] In the above implementation, application developers can obtain the identification information of the second component package from the signature information, and after the second component package is integrated into the first application, the identification information of the second component package is stored in the software package of the first application without parsing the configuration file of the second component package to obtain the identification information of the second component package. This makes the application development speed faster.
[0022] In one possible implementation of the first aspect, the first platform includes at least one platform central repository. After generating identification information for a first component package, the first platform stores the identification information in at least one platform central repository. The identification information stored in the platform central repository is used to verify second component packages obtained by other platforms to determine the integration status of the second component packages in the application.
[0023] In the above implementation, there is no need to mark the component package based on the coordinate information of the component package in the platform central repository. In this way, the same component package will have the same identification information even if it is stored in different platform central repositories, thereby reducing the situation of identification information conflict. The second platform can also detect the component packages integrated in the application, thereby obtaining the integration status of the component packages.
[0024] In one possible implementation of the first aspect, during the process of the second platform parsing the software package and obtaining the first file, the software package is unpacked to obtain the second file, wherein the second file includes the file generated after compiling the application's source code and application configuration file; the second platform obtains the first file from the second file.
[0025] In the above implementation, the file storing the identification information can be a sub-file of the second file.
[0026] In one possible implementation of the first aspect, if the identification information exists on the first platform, the second platform determines that the identification information verification is successful; if the identification information does not exist on the first platform, the second platform determines that the identification information verification fails.
[0027] Since the identification information of the component packages is uniformly configured by the first platform, there will be no conflict between the identification information of different component packages. Therefore, the second platform can more accurately determine the integration status of the component packages based on the identification information obtained from the application package and the identification information stored by the first platform.
[0028] Secondly, a component package marking method is provided, applied to a first platform, which provides at least one component package. In this method, the first platform receives a first component package and generates identification information for the first component package, wherein the identification information is used to uniquely identify the first component package. The first platform writes the identification information into a configuration file of the first component package to obtain a second component package, wherein the second component package is used to integrate into a first application to implement a first function of the first application; and receives information sent by the second platform indicating the integration status of the second component package in the application.
[0029] In one possible implementation of the second aspect, the identification information of the first component package includes first information. During the process of generating the identification information of the first component package, the first platform generates a first identifier for the first component package and concatenates the first identifier with first preset information to generate the first information of the first component package. The first identifier is used to indicate the first component package, and the first preset information is used to indicate the first information.
[0030] In one possible implementation of the second aspect, the identification information of the first component package further includes second information. During the process of generating the identification information of the first component package, the first platform generates second information in addition to the first information. Specifically, the first platform concatenates the package information of the first component package with second preset information to generate the second information of the first component package. The package information indicates at least one of the name, type, and version number of the first component package, and the second preset information indicates the second information.
[0031] In one possible implementation of the second aspect, the first component package is a source code component package and the configuration file is a source code file; or, the first component package is a binary component package and the configuration file is a binary file.
[0032] In one possible implementation of the second aspect, the first component package is a binary component package, and the configuration file is a binary file. During the process of obtaining the second component package, the first platform writes identification information into the configuration file and also writes identification information into the source code file after decompiling the configuration file to obtain the second component package.
[0033] In one possible implementation of the second aspect, after obtaining the second component package, the first platform signs the second component package to obtain signature information, writes identification information into the signature information, and saves the signature information with the identification information written into the second component package.
[0034] In one possible implementation of the second aspect, the first platform includes at least one platform central repository. After generating identification information for the first component package, the first platform stores the identification information in at least one platform central repository. The identification information stored in the platform central repository is used to verify the second component package obtained by other platforms to determine the integration status of the second component package in the application.
[0035] Thirdly, a component package integration detection method is provided, applied to a second platform, which provides a software package for at least one application. In this method, the second platform receives the software package of a first application, parses the package, and obtains a first file. The first file includes a compiled configuration file of the component package, which includes identification information for the component package. This identification information is generated by the first platform to uniquely identify the component package. The first platform provides at least one component package. Based on the first file, the second platform obtains the identification information. If the identification information is successfully verified, the second platform determines that the first application has integrated the second component package corresponding to the identification information and sends information to the first platform indicating the integration status of the second component package in the application.
[0036] In one possible implementation of the third aspect, during the process of the second platform parsing the software package and obtaining the first file, the software package is unpacked to obtain the second file, wherein the second file includes the file generated after compiling the application's source code and application configuration file, and the first file is obtained from the second file.
[0037] In one possible implementation of the third aspect, the identification information includes first information, which is generated by the first platform by concatenating a first identifier and first preset information of the component package; or, the identification information includes first information and second information, which is generated by the first platform by concatenating the package information and second preset information of the component package. The package information indicates at least one of the component package's name, type, and version number; the first identifier indicates the first component package; the first preset information indicates the first information; and the second preset information indicates the second information.
[0038] In one possible implementation of the third aspect, if the identification information exists on the first platform, the second platform determines that the identification information verification is successful; if the identification information does not exist on the first platform, the second platform determines that the identification information verification fails.
[0039] In one possible implementation of the third aspect, if the identification information exists on the first platform, the identification information is stored in at least one platform central repository on the first platform.
[0040] Fourthly, a component package integration detection system is provided, comprising a first platform and a second platform. The first platform is used to provide at least one component package; the second platform is used to provide a software package for at least one application.
[0041] A first platform is used to receive a first component package; generate identification information for the first component package; and write the identification information into the configuration file of the first component package to obtain a second component package; wherein the identification information is used to uniquely identify the first component package; and the second component package is used to integrate into a first application to implement the first function of the first application.
[0042] The second platform is used to receive the software package of the first application; parse the software package to obtain the first file; obtain identification information based on the first file; if the identification information is successfully verified, determine that the first application has integrated the component package corresponding to the identification information; and send information to the first platform to indicate the integration status of the second component package in the application; the first file includes a file after compiling the configuration file of the component package.
[0043] Fifthly, a first platform is provided, which is used to provide at least one component package. The first platform includes:
[0044] A component receiving unit is used to receive the first component package;
[0045] The identification management unit is used to generate identification information for the first component package; the identification information is used to uniquely identify the first component package.
[0046] The component management unit is used to write identification information into the configuration file of the first component package to obtain the second component package; the second component package is used to integrate into the first application to implement the first function of the first application.
[0047] The information receiving unit is used to receive information sent by the second platform that indicates the integration status of the second component package in the application.
[0048] Sixthly, a second platform is provided for providing a software package for at least one application. The second platform includes:
[0049] A software package receiving unit is used to receive the software package of the first application;
[0050] The parsing unit is used to parse the software package and obtain the first file; the first file includes a file after compiling the configuration file of the component package, the configuration file includes the identification information of the component package, the identification information is information generated by the first platform for the component package to uniquely identify the component package, and the first platform is used to provide at least one component package;
[0051] The parsing unit is also used to obtain identification information based on the first file;
[0052] An integrated detection unit is used to determine, if the identification information is successfully verified, that the first application has integrated the second component package corresponding to the identification information;
[0053] The information sending unit is used to send information to the first platform to indicate the integration status of the second component package in the application.
[0054] A seventh aspect provides an electronic device, including a memory and one or more processors; the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform a component package marking method as described in the second aspect and any of its implementable embodiments, or cause the electronic device to perform a component package integration detection method as described in the third aspect and any of its implementable embodiments.
[0055] Eighthly, a computer-readable storage medium is provided, including computer instructions that, when executed on an electronic device, cause the electronic device to perform the component package marking method as described in the second aspect and any of its implementable embodiments, or cause the electronic device to perform the component package integration detection method as described in the third aspect and any of its implementable embodiments.
[0056] Ninthly, a computer program product is provided, which, when run on a computer, causes the computer to execute the component package marking method as described in the second aspect and any of its possible implementations, or causes the electronic device to execute the component package integration detection method as described in the third aspect and any of its possible implementations.
[0057] The beneficial effects that can be achieved by the component package integration detection system provided in the fourth aspect, the first platform provided in the fifth aspect, the second platform provided in the sixth aspect, the electronic equipment provided in the seventh aspect, the computer-readable storage medium provided in the eighth aspect, and the computer program product provided in the ninth aspect can be referred to the beneficial effects that can be achieved by the first aspect and any of its implementation methods, and will not be repeated here. Attached Figure Description
[0058] Figure 1 A schematic diagram illustrating the component market display of component download status provided in an embodiment of this application;
[0059] Figure 2 A schematic diagram of the component package integration detection system provided in this application embodiment. Figure 1 ;
[0060] Figure 3 A schematic diagram of the component package integration detection system provided in this application embodiment. Figure 2 ;
[0061] Figure 4 A flowchart illustrating the component package marking method provided in this application embodiment;
[0062] Figure 5 A schematic diagram of a configuration file in source code form provided in an embodiment of this application;
[0063] Figure 6A schematic diagram of a binary configuration file provided in an embodiment of this application;
[0064] Figure 7 A schematic diagram illustrating the processing of a second component package by a component marketplace provided in an embodiment of this application;
[0065] Figure 8 A flowchart illustrating the component package integration detection method provided in this application embodiment. Figure 1 ;
[0066] Figure 9 A schematic diagram of the application software package provided in the embodiments of this application;
[0067] Figure 10 A flowchart illustrating the component package integration detection method provided in this application embodiment. Figure 2 ;
[0068] Figure 11 A schematic diagram of the first platform provided in an embodiment of this application;
[0069] Figure 12 A schematic diagram of the second platform provided in an embodiment of this application;
[0070] Figure 13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0071] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of this application, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can represent A or B. "And / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone, where A and B can be singular or plural. Furthermore, in the description of this application, unless otherwise stated, "multiple" refers to two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple. Furthermore, to facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that "first" and "second" are not necessarily different. Meanwhile, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is being used as an example, illustration, or description. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.
[0072] Furthermore, the business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0073] Currently, components and templates can help application developers quickly develop applications during the application development process.
[0074] Components can possess a specific capability. For example, a calendar component can provide calendar functionality; a password component can store or provide passwords; a payment component can provide payment functionality; and an account login component can provide account login functionality. From another perspective, a component can be a software development kit (SDK) that supports an application in implementing one or more functionalities.
[0075] Templates can be source code designed for a relatively complete business scenario, and they can be generated based on various components. During application development, developers can easily modify the template to integrate it into the application's source code and build an application package. For example, for a food ordering mini-program template, developers can replace the food icons or images in the template to create different application packages.
[0076] Understandably, component packages can be generated based on components or templates.
[0077] After packaging components or templates into component packages, component developers can upload these packages to a component marketplace (or component store) for listing. Application developers can then obtain the necessary component packages from the marketplace and integrate them into their application's source code (or code project) to complete application development and generate an application software package. Finally, application developers can upload this application software package to an app marketplace (or app store) for listing.
[0078] When using mobile phones, tablets, and other electronic devices, users can obtain the necessary application packages from app stores and install them on their devices. Afterward, users can experience the functions provided by the applications on their electronic devices.
[0079] Currently, component marketplaces may provide data such as component package downloads, likes, and favorites. Figure 1 As shown, this data allows component and application developers to understand which component packages are widely used and highly rated. However, component marketplaces cannot provide real-world usage and integration data for component packages. Consequently, component developers cannot know how well their packages are integrated, making it difficult to modify, upgrade, or design packages specifically to meet the needs of application developers.
[0080] The aforementioned component marketplace can impose constraints on the packaging specifications of component packages. Based on this, some solutions can use these constraints to check the integration of component packages within applications. For example, checking whether component packages in an application software package conform to packaging specifications and constraints. These constraints include, but are not limited to, adherence to directory conventions and naming conventions.
[0081] However, this detection method has limited applicability because currently only some component markets define packaging specifications, and component developers need to pre-embed development. In other words, developers need to manipulate the component's source code during the component development stage. Developers can write any content, which may lead to conflicts between component packages provided by different developers. This is actually not conducive to the integration detection of component packages.
[0082] The aforementioned component marketplace can also store component packages in different central repositories. Based on this, some solutions can use the coordinates of the central repositories where the component packages are stored to detect the integration status of the component packages in the application. For example, by decompiling the application's software package to obtain the coordinate information of all dependencies, and comparing the obtained coordinate information with the coordinate information in the various central repositories of the component marketplace, if the central repositories have the same coordinate information, it is determined that the component package corresponding to that coordinate information is integrated into the application.
[0083] Before uploading a component package to the component marketplace, developers can generate a hash value for the component package. Based on this, some solutions can use the hash value of the component package to detect its integration status in the application. For example, the hash value in the application package is obtained and compared with the hash values maintained in the component marketplace. If the same hash value exists in the component marketplace, it is determined that the component package corresponding to that hash value is integrated into the application.
[0084] However, the coordinates and hash values of component packages in the central repository are usually marked by developers, and different developers may use different methods or rules for marking coordinates and hash values. For example, the same component package may have different coordinates in different central repositories, or the same coordinates may simply indicate different component packages in different central repositories. As a result, using the above method to detect component package integration can easily lead to conflicting coordinate information, resulting in incorrect integration detection results.
[0085] Furthermore, the detection platform needs to spend a significant amount of time understanding the different developers' tagging rules for component packages before detection. This is not only time-consuming, but also results in an incomplete understanding of the rules, which can affect the integration detection results. Moreover, once the component package version is updated, the corresponding coordinate information and hash value are updated relatively slowly.
[0086] Based on the above, this application provides a component package marking method. This method can be applied to a component package integration detection system including a first platform and a second platform. The first platform provides at least one component package, and the second platform provides a software package for at least one application. In this method, the first platform receives a first component package, generates identification information for the first component package, and writes the identification information into a configuration file of the first component package to obtain a second component package. The identification information uniquely identifies the first component package, and the second component package is integrated into a first application to implement a first function of the first application.
[0087] Subsequently, the second platform receives the software package from the first application, parses the package, and obtains a first file, which includes a compiled configuration file of the component package. Based on the first file, the second platform obtains identification information. If the identification information is successfully verified, the second platform determines that the first application has integrated the second component package corresponding to the identification information. Furthermore, the second platform sends information to the first platform indicating the integration status of the second component package within the application.
[0088] The aforementioned first platform, such as component platforms, component stores, and component marketplaces, can uniformly assign unique identifiers to received component packages and write these identifiers into the component package's configuration file. Developers and other users are unaware of this process. Component developers do not need to manually mark and configure component packages, reducing conflicts caused by different developers' marking rules. During component package integration testing, the corresponding component package can be accurately identified based on the identifiers. Furthermore, there is no need to understand the marking rules of each developer, greatly reducing workload and improving efficiency.
[0089] In addition, the first platform writes the identification information into the configuration file of the component package, and the identification information can also be obtained from a fixed location in the component package.
[0090] Because the identification information of component packages is uniformly configured by the first platform, there are no conflicts between the identification information of different component packages. Therefore, second platforms, such as app stores and app markets, can more accurately determine the integration status of component packages based on the identification information obtained from the application packages. Furthermore, when performing testing, the second platform does not need to know the marking rules of each developer, greatly reducing workload and improving efficiency.
[0091] It is understandable that the second component package can be any of the multiple component packages provided by the first platform, and the first application can be any of the multiple applications provided by the second platform. The second platform can perform component package integration detection for each application to determine which component packages the application inherits. The second platform then sends information indicating the integration status of each component package in the application to the first platform. This allows component developers and other users on the first platform to understand the integration status of each component package, facilitating subsequent updates, modifications, and development of the component packages.
[0092] In some embodiments, see Figure 2 As shown, the above-mentioned component package integration detection system may include a third platform and a fourth platform in addition to the first platform and the second platform.
[0093] Component developers can complete the development of components and templates on the fourth platform, and package the developed components and templates into a component package. Then, the component developers can upload the component package to the first platform through the fourth platform.
[0094] After receiving the component package, the first platform generates a unique identifier for the component package and writes the identifier into the component package's configuration file. Then, the component package is packaged and uploaded to the app store. The first platform also saves the generated identifier.
[0095] For example, the first platform saves component identification specifications or tagging rules to ensure that the identification information for each component package is in the same format and that the identification information for each component package does not conflict.
[0096] For example, the first platform also includes an information writing module for writing identification information into the configuration file of the component package.
[0097] For example, the first platform also includes a re-signature module for signing the component package containing the identification information.
[0098] In some examples, the first platform can have multiple ways to generate identification information for component packages.
[0099] For example, the first platform can first generate a first identifier (such as an identity document, ID) for the component package. This first identifier, used to indicate the first component package, can be a unique string of numbers, characters, etc., such as 15645243245644. Then, the first platform concatenates the first identifier with first preset information to generate the component package's identification information. This first preset information indicates the identification information (or first information). The first preset information can be a fixed identifier, such as "agcic," and can be concatenated by appending the first preset information before the first identifier. In this case, the first preset information can serve as a fixed prefix. For example, the identification information could be "agcic-15645243245644."
[0100] For another example, the first platform concatenates the first identifier with the first preset information to obtain the first information, such as agcic-15645243245644. Then, the first platform concatenates the package information of the component package with the second preset information to generate the second information of the component package. The package information can indicate at least one of the component package's name, type (such as industry classification), and version number. The second preset information is used to indicate the second information; for example, the second preset information can be a fixed identifier, such as @ohos-agcic / . The concatenation method can be to append the second preset information before the name, type, version number, etc. In this case, the second preset information can be a fixed prefix. For example, if the component package name is uiBeauty, the component package type is tool, and the component package version number is 1.0.0, the second information obtained after concatenation could be @ohos-agcic / tool-uiBeauty / 1.0.0. Finally, the first platform uses the first information and the second information as the component package's identification information. The first information identifies the component package, and the second information indicates the specific information of the component package.
[0101] In some examples, the component packages sent from the fourth platform to the first platform can take multiple forms, such as binary form (e.g., binary package, .jar package, .so package, etc.) or source code form (e.g., source code package).
[0102] The first platform writes identification information into the component package in different ways depending on the type of component package.
[0103] For example, for component packages in source code form, since the content in the component package is all in source code form, the configuration file of the component package is also a source code file. The source code can be modified and written. Therefore, the first platform can directly write identification information into the source code of the configuration file.
[0104] For example, for component packages in binary format, since the content within the component package is all in binary form, the configuration file for the component package is also a binary file. Binary files cannot be modified or written. Therefore, the first platform needs to decompile the configuration file to obtain the source code file, and then write identification information into the source code file. Afterwards, the first platform compiles the source code file with the added identification information to obtain the binary file.
[0105] Application developers can develop applications on a third platform. Based on the functions the application needs to implement, they can download the corresponding component packages from the first platform, integrate the component packages into the application on the third platform to complete the application development, and then upload the generated application software package to the second platform.
[0106] After receiving the application's software package, the second platform decompiles the package to obtain multiple files. These files include a pre-compiled file containing a configuration file for storing component packages, such as the first file. The second platform then retrieves identification information from the first file and verifies it. If the verification is successful, it determines that the received application integrates the component package corresponding to that identification information.
[0107] In some examples, when the second platform verifies the identification information, it can send the identification information to the first platform. The first platform verifies whether the received identification information exists in the saved identification information. If it exists, the identification information verification is successful; if it does not exist, the identification information verification fails.
[0108] In some examples, such as Figure 3 As shown, the aforementioned component package integration detection system may further include a credential management module. This module is responsible for issuing public and private keys, certificates, etc., to the component packages on the first platform. Specifically, the credential management module may include a certificate management service, a DSS encryption module, etc. The credential management module can sign the second component package obtained after writing identification information, generating signature information. This facilitates authentication of the component package by its users.
[0109] In some examples, the credential management module may be a module on the first platform or may be independent of the first platform. This application embodiment does not impose specific restrictions on this.
[0110] After determining the integration status of the component package in the application, the second platform can also send information to the first platform to indicate the integration status. For example, the integration status can indicate the application that integrated the component package. Upon receiving this information, the first platform can determine which application integrated the component package, and, for the same component package, can combine multiple received information about the component package to determine the number of times it has been integrated. The first platform can then provide the component package's integration status and the number of times it has been integrated to component developers and other users.
[0111] In some examples, the process of the second platform sending the aforementioned information to the first platform can be carried out when both the first platform and the first platform are from the same manufacturer or the same developer.
[0112] In other examples, if the first platform and the second platform come from different manufacturers or different developers, the second platform may not need to send the above information to the first platform.
[0113] The first platform mentioned above may include a component platform, component marketplace, component store, etc.; the second platform may include an application platform, application distribution platform, application marketplace, application store, etc.; the third platform may include an application developer platform, developer platform, etc.; and the fourth platform may include a component developer platform, developer platform, etc. Furthermore, for example, the first or second platform may be integrated into an electronic device, or it may be a service provided by the cloud side, or it may be integrated into a cloud-side device (such as a server).
[0114] The following explanation uses the component marketplace as an example (the first platform being the component marketplace and the application marketplace as the second platform) to illustrate the tagging process and integration detection process of the aforementioned component packages.
[0115] In some embodiments, this application provides a component package tagging method, see [link to relevant documentation]. Figure 4 As shown, the component package marking method may include the following steps S401-S404.
[0116] S401, The component market receives the first component package.
[0117] The component marketplace is used to provide component resources, such as providing at least one component package.
[0118] In some examples, the first component package received by the component marketplace may be sent by the component developer after completing the development of the component or template and packaging it into a component package. The component marketplace is used to provide component resources, such as components and templates, to component users, such as application development platforms and application developers. Application developers can obtain or download at least one component package from the component marketplace.
[0119] S402, The component market generates the identification information of the first component package.
[0120] In some examples, after receiving the first component package, the component developer can also input basic information about the first component package, such as its name, type, and version number, to initiate a component listing request to the component marketplace. The component marketplace then responds to the listing request by generating identification information for the first component package based on its basic information.
[0121] In other examples, the first component package may also carry basic information. After receiving the first component package, the component marketplace can generate the identification information of the first component package based on the basic information of the first component package.
[0122] The identification information is used to uniquely identify the first component package.
[0123] In some examples, the first component package includes a configuration file. The first component package can be a source code-based component package, where the configuration file is the source code file. For example, the configuration file could be a string.json file. Taking the component package name uiBeauty as an example, the source code-based component package could be represented as uiBeauty.zip, and the binary-based component package could be represented as uiBeauty.har.
[0124] Alternatively, in other examples, the first component package can also be a binary component package, where the configuration file is a binary file.
[0125] In some examples, the identification information of the first component package may include first information. Specifically, the component marketplace can generate a first identifier for the first component package, and then concatenate the first identifier with first preset information to generate the first information of the first component package. The first identifier is used to indicate the first component package. For example, the first preset information, used to indicate the first information, can be a fixed prefix. The first information can be a prefix concatenated before the first preset information, thus uniquely identifying the first component package. For example, the first information could be name:agcic-15645243245644.
[0126] In some examples, the identification information of the first component package may include first information and second information. Specifically, the component marketplace can generate a first identifier for the first component package, and then concatenate the first identifier with first preset information to generate the first information of the first component package. The component marketplace concatenates the package information of the first component package with second preset information to generate the second information of the first component package. The package information indicates at least one of the first component package's name, type, and version number. The second preset information indicates the second information; for example, the second preset information can be a fixed prefix, and the second information can be a prefix concatenated before the second preset information. In this way, the identification information can uniquely identify the first component package and specifically describe the component package's name, type, version number, etc. For example, the second information could be `value: @ohos-agcic / tool-uiBeauty / 1.0.0`, where `@ohos-agcic / ` represents the second preset information, `tool` represents the type of the first component package, `uiBeauty` represents the name of the first component package, and `1.0.0` represents the version number of the first component package.
[0127] The identification information can be represented as:
[0128] {
[0129] "name":"agcic-15645243245644",
[0130] "value":"@ohos-agcic / tool-uiBeauty / 1.0.0"
[0131] }
[0132] S403. The component market writes identification information into the configuration file of the first component package to obtain the second component package.
[0133] In some examples, the component marketplace can use different methods to write identification information for different types of configuration files.
[0134] For example, for configuration files in source code form, the component marketplace can directly write identification information into the configuration file.
[0135] For example, the contents of the source code configuration file string.json can be found here. Figure 5 As shown in (a) above, the identifier information written by the component marketplace to the string.json file can be found in [reference]. Figure 5 As shown in (b) of the diagram.
[0136] As another example, for binary configuration files, the component marketplace can decompile the configuration files and write identification information into the decompiled source code files to obtain a second component package.
[0137] For example, the contents of the binary configuration file resources.index can be found in [link to relevant documentation]. Figure 6 As shown, since the configuration file is in binary format, its contents are not easy to view after opening. Therefore, it is necessary to decompile the configuration file into source code (such as...). Figure 5 You can only view and modify it after (a) and (b) in the text.
[0138] Among them, after writing identification information into the decompiled source code file, the component marketplace can also compile the source code file with the added identification information into a binary configuration file.
[0139] For example, the above identification information can also be written into the configuration file in the form of key-value pairs. In the key-value pair, the key represents "name":"agcic-15645243245644" in the identification information, and the value represents "value":"@ohos-agcic / tool-uiBeauty / 1.0.0" in the identification information.
[0140] In the above example, the component marketplace can write component package identification information to identify both source code files and binary files.
[0141] After obtaining the second component package, the component marketplace can list it. Application developers or app stores can download the second component package from the component marketplace and integrate it into the first application to achieve the first function of the first application. Since the second component package includes identification information, after it is integrated into the first application, the first application's software package will also include the identification information of the second component package.
[0142] S404. The component market receives information from the application market indicating the integration status of the second component package in the application.
[0143] In the above solution, the component platform can uniformly assign unique identifiers to received component packages and write these identifiers into the component package's configuration file. This eliminates the need for component developers to manually mark and configure component packages, reducing conflicts caused by different developers' marking rules. During component package integration testing, the platform can accurately identify the corresponding component package based on the identifiers, and it also eliminates the need to understand each developer's marking rules, significantly reducing workload and improving efficiency.
[0144] In addition, the first platform writes the identification information into the configuration file of the component package, and the identification information can also be obtained from a fixed location in the component package.
[0145] The second component package can be any of the multiple component packages provided by the first platform, and the first application can be any of the multiple applications provided by the second platform. The second platform can perform component package integration detection for each application to determine which component packages the application inherits. The second platform then sends information indicating the integration status of each component package in the application to the first platform. This allows component developers and other users on the first platform to understand the integration status of each component package, facilitating subsequent updates, modifications, and development of the component packages.
[0146] In some embodiments, after obtaining the second component package, the component marketplace can also sign the second component package. The signed signature information can be stored in the second component package, for example, in the signature block corresponding to the second component package. Furthermore, the component marketplace can also write the identification information of the second component package (i.e., the identification information of the first component package) into the obtained signature information. For example… Figure 7 As shown, the component marketplace obtains the signature information of the second component package from the credential management module and writes the identification information of the second component package into the signature information of the second component package.
[0147] The aforementioned signature information is used by application developers to authenticate the second component package. For example, after obtaining the second component package from the component marketplace, the application developer verifies its signature information to determine its identity. If the second component package is not from the same vendor as the application developer's current application, or if the developer of the second component package is different from that of the current application, the application development platform will prompt the application developer whether to continue using the second component package. If the second component package is from the same vendor as the application developer's current application, or if the developer of the second component package is the same as that of the current application, the application development platform may not prompt the application developer.
[0148] Application developers can also obtain the identification information of the second component package from the signature information, and after the second component package is integrated into the first application, save the identification information of the second component package in the application package without parsing the configuration file of the second component package to obtain the identification information of the second component package. This makes the application development speed faster.
[0149] In some embodiments, the component marketplace described above may include at least one platform central repository. For example, different platform central repositories may belong to different vendors, platforms, etc., and provide data, information, resources, etc. to different vendors and platforms.
[0150] After obtaining the second component package, the component market can also store the second component package in at least one platform central repository, or in the platform central repository corresponding to the vendor that provided the second component package (or the first component package), thereby achieving persistent storage of identification information.
[0151] After generating the identification information of the second component package (i.e. the identification information of the first component package), the component market can also save the identification information in at least one platform central repository, or save the identification information of the second component package in the platform central repository corresponding to the vendor that provides the second component package (or the first component package).
[0152] The identification information stored in each platform's central repository can be used to verify the second component packages obtained from other platforms, in order to determine the integration status of the second component packages in the application.
[0153] In some examples, after obtaining the application package uploaded by the application developer, the application market can parse the application package to obtain the identification information of the component packages integrated into the application. The parsed identification information is then checked for consistency with the identification information stored in at least one platform central repository in the component market. If at least one platform central repository contains information that is the same as the identification information parsed by the application market, it can be determined that the component package corresponding to the identification information is integrated into the application currently detected by the application market. After that, the application market sends information to the component, and the component market increments the integration count of the component package corresponding to the identification information by 1.
[0154] The component package marking method in this application embodiment can mark component packages without relying on the coordinate information of the component package in the platform central repository. In this way, the same component package will have the same identification information even if it is stored in different platform central repositories, thereby reducing the situation of identification information conflict. The application market can also detect the component packages integrated in the application, thereby obtaining the integration status of the component packages.
[0155] In some embodiments, after storing the identification information of the second component package (or the identification information of the first component package) in the platform central repository, the component marketplace may send a notification message to the component development platform or component development device that sent the first component package to notify the user using the component development platform or component development device that the component package has been listed.
[0156] In some embodiments, this application provides a component package integration detection method, see [link to relevant documentation]. Figure 8 As shown, the above component package integration detection method may include the following steps S801-S805.
[0157] S801, the application market receives the software package of the first application.
[0158] The application marketplace is used to provide application software package resources, such as providing a software package for at least one application.
[0159] In some examples, the first application package received by the app market may be sent to the app market by the application developer after the first application has been developed and packaged into a software package. App markets are used to provide application resources, such as calendar applications, game applications, and video applications, to application users, such as mobile phones, tablets, and personal computers. Devices such as mobile phones can obtain or download at least one application package from the app market.
[0160] S802: The application market parses the software package of the first application and obtains the first file.
[0161] The first file includes a compiled configuration file of the component package, which contains the component package's identification information.
[0162] For example, the first file could be the resources.index file.
[0163] In some examples, during the integration of the component package into the first application, the code portion of the component package is merged into the second file; the contents of the component package's configuration file are merged and compiled into the first file within the second file.
[0164] Therefore, while parsing the software package to obtain the first file, the app store can also unpack the package to obtain the second file. Then, the app store retrieves the first file from the second file.
[0165] Understandably, the second file mentioned above includes files generated after compiling the application's source code and application configuration files, such as the entry-default.hap file. The first file can be the resources.index file.
[0166] S803, the application market obtains identification information based on the first document.
[0167] In some examples, the identification information may include first information, which may be generated by the component marketplace by concatenating a first identifier and first preset information of the component package. Alternatively, the identification information may also include first information and second information, where the second information may be generated by the first platform by concatenating the package information and second preset information of the component package, wherein the package information is used to indicate at least one of the component package's name, type, and version number.
[0168] For example, see Figure 9 As shown, the code portion of the component package will be merged into the ets file within the entry-default.hap file, and the contents of the string.json configuration file of the component package will be merged and compiled into the resources.index file within the entry-default.hap file.
[0169] After unpacking the software package, the entry-default.hap file can be obtained. The application market can then retrieve the resources.index file from the entry-default.hap file and parse it to obtain identification information. This identification information can include, for example:
[0170] {
[0171] "name":"agcic-15645243245644",
[0172] "value":"@ohos-agcic / tool-uiBeauty / 1.0.0"
[0173] }
[0174] S804. If the identification information is successfully verified, the application market determines that the first application has integrated the second component package corresponding to the identification information.
[0175] In some examples, the app market can determine that the identification information verification is successful if the identification information exists in the component market; or determine that the identification information verification fails if the identification information does not exist in the component market.
[0176] For example, after obtaining the identification information from the software package, the application market can send a verification request carrying the identification information to the component market. Upon receiving the verification request, the component market determines whether the same identification information exists locally (in the local platform central repository). If it does, it means that the component package corresponding to the identification information is legitimate and has been listed on the component market. The component market then sends a verification success notification message to the application market so that the application market can determine that the first application currently being tested integrates the second component package corresponding to the identification information.
[0177] If the same identifier does not exist in the local component marketplace (the local platform central repository), it means that the component package corresponding to the identifier is not legitimate, or the component package has not been listed on the component marketplace. As a result, the component marketplace sends a verification failure notification message to the application marketplace so that the application marketplace can determine that the component package integrated by the first application being tested is illegitimate.
[0178] S805, The application market sends information to the component market to indicate the integration status of the second component package in the application.
[0179] Because the identification information for component packages is uniformly configured by the component marketplace, there are no conflicts between the identification information of different component packages. Therefore, the application marketplace can more accurately determine the integration status of component packages by combining the identification information obtained from the application packages with the identification information stored in the component marketplace. Furthermore, when performing component package integration testing, the application marketplace does not need to know the marking rules of each developer, which can greatly reduce workload and improve efficiency.
[0180] In some embodiments, the above-described component package integration detection method may also refer to Figure 10The process is as follows: Application developer C developed application B on an application development platform, but was not satisfied with the user interface (UI) aesthetics of application B. Application developer C browsed the component marketplace and found a packaged component, uiBeauty.zip. Next, application developer C downloaded uiBeauty.zip from the component marketplace and integrated it into their application B. After compilation and building using an integrated development environment (IDE), the B.app package was created. Finally, application developer C submitted B.app to the application marketplace.
[0181] After verifying B.app (such as signature authentication, integrity verification, and other rule verifications), the app store unpacks B.app to obtain the entry-default.hap file. Then, the app store reads the resources.index file from the entry-default.hap file and parses it to obtain key-value pairs starting with "agcic-". Parsing these key-value pairs reveals the identifier information:
[0182] {
[0183] "name":"agcic-15645243245644",
[0184] "value":"@ohos-agcic / tool-uiBeauty / 1.0.0"
[0185] }
[0186] The app store then compares the parsed identifier information with the identifier information in the component market. It can determine that agcic-15645243245644 is valid data, and finally draws the integration test result: B.app has integrated the component uiBeauty.
[0187] In some solutions, multiple embodiments of this application can be combined, and the combined solution can be implemented. Optionally, some operations in the processes of each method embodiment may be combined, and / or the order of some operations may be changed. Furthermore, the execution order between the steps of each process is merely exemplary and does not constitute a limitation on the execution order between steps; other execution orders are also possible. It is not intended to indicate that the execution order is the only possible order in which these operations can be performed. Those skilled in the art will conceive of various ways to reorder the operations described in the embodiments of this application. In addition, it should be noted that the process details involved in one embodiment of this application are also applicable to other embodiments in a similar manner, or different embodiments may be combined.
[0188] Furthermore, some steps in the method embodiments can be equivalently replaced with other possible steps. Alternatively, some steps in the method embodiments may be optional and can be deleted in certain use cases. Or, other possible steps may be added to the method embodiments.
[0189] Furthermore, the various method embodiments can be implemented individually or in combination.
[0190] It is understood that, in order to achieve the above functions, the aforementioned electronic device includes hardware and / or software modules corresponding to perform each function. Based on the algorithmic steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.
[0191] This embodiment can divide the electronic device into functional modules according to the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0192] This application provides a first platform, which may be a component platform, component marketplace, component store, etc., as described in the foregoing embodiments. The first platform is used to provide at least one component package. For example, see [link to example]. Figure 11 As shown, the first platform includes a component receiving unit, an identifier management unit, a component management unit, and an information receiving unit.
[0193] The component receiving unit is used to receive the first component package, for example, to execute the relevant content of S401 in the aforementioned embodiment.
[0194] The identification management unit is used to generate identification information for the first component package; the identification information is used to uniquely identify the first component package; for example, the identification management unit executes the relevant content of S402 in the aforementioned embodiment.
[0195] The component management unit is used to write identification information into the configuration file of the first component package to obtain the second component package; the second component package is used to integrate into the first application to implement the first function of the first application; for example, the component management unit executes the relevant content of S403 in the aforementioned embodiment.
[0196] The information receiving unit is used to receive information sent by the second platform that indicates the integration status of the second component package in the application; for example, the information receiving unit executes the relevant content of S404 in the aforementioned embodiment.
[0197] This application provides a second platform, which may be the application platform, application market, or application store described in the foregoing embodiments. The second platform is used to provide a software package for at least one application. For example, see [link to example]. Figure 12 As shown, the second platform includes a software package receiving unit, a parsing unit, an integration detection unit, and an information sending unit.
[0198] The package receiving unit is used to receive the package of the first application, such as executing the relevant content of S801 in the aforementioned embodiment.
[0199] The parsing unit is used to parse the software package and obtain a first file. The first file includes a file after compiling the configuration file of the component package. The configuration file includes the identification information of the component package. The identification information is information generated by the first platform for the component package to uniquely identify the component package. The parsing unit is also used to obtain the identification information according to the first file. For example, the parsing unit executes the relevant content of S802 and S803 in the aforementioned embodiment.
[0200] An integrated detection unit is used to determine that the first application has integrated the second component package corresponding to the identification information if the identification information is successfully verified; for example, the integrated detection unit executes the relevant content of S804 in the aforementioned embodiment.
[0201] The information sending unit is used to send information to the first platform to indicate the integration status of the second component package in the application; for example, the information sending unit executes the relevant content of S805 in the aforementioned embodiment.
[0202] This application also provides an electronic device that may include at least one of the first platform, second platform, third platform, or fourth platform described above. For example... Figure 13As shown, the electronic device may include one or more processors 1301, memory 1302 and communication interface 1303.
[0203] The memory 1302, communication interface 1303, and processor 1301 are coupled together. For example, the memory 1302, communication interface 1303, and processor 1301 can be coupled together via bus 1304.
[0204] The communication interface 1303 is used for data transmission with other devices. The memory 1302 stores computer program code. The computer program code includes computer instructions, which, when executed by the processor 1301, cause the electronic device to perform the component package marking method or the component package integration detection method described in this embodiment.
[0205] The processor 1301 may be a processor or controller, such as a CPU, a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with this disclosure. The processor may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0206] The bus 1304 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 1304 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 13 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0207] This application also provides a computer-readable storage medium that includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the relevant method steps described in the above method embodiments.
[0208] This application also provides a computer program product that, when run on a computer, causes the computer to execute the relevant method steps described in the above method embodiments.
[0209] The first platform, second platform, electronic device, computer-readable storage medium, or computer program product provided in this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0210] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0211] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0212] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0213] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0214] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, in essence, or the part that contributes, or all or part of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for detecting the integration of component packages, characterized in that, An application is provided in a component package integration and testing system, the system comprising a first platform and a second platform; the first platform is used to provide at least one component package. The second platform is used to provide a software package for at least one application; the method includes: The first platform receives the first component package; The first platform generates identification information for the first component package; the identification information is used to uniquely identify the first component package; The first platform writes the identification information into the configuration file of the first component package to obtain the second component package; the second component package is used to integrate into the first application to implement the first function of the first application. The second platform receives the software package from the first application; The second platform parses the software package to obtain a first file; the first file includes a file compiled from the configuration file of the component package; The second platform obtains the identification information based on the first file; If the identification information is successfully verified, the second platform determines that the first application has integrated the second component package corresponding to the identification information; The second platform sends information to the first platform to indicate the integration status of the second component package in the application.
2. The method according to claim 1, characterized in that, The identification information of the first component package includes first information; the identification information of the first component package generated by the first platform includes: For the first component package, the first platform generates a first identifier for the first component package; the first identifier is used to indicate the first component package; The first platform concatenates the first identifier with the first preset information to generate the first information of the first component package; the first preset information is used to indicate the first information.
3. The method according to claim 2, characterized in that, The identification information of the first component package also includes second information; the identification information of the first component package generated by the first platform also includes: The first platform concatenates the package information of the first component package with the second preset information to generate the second information of the first component package; the package information is used to indicate at least one of the name, type and version number of the first component package, and the second preset information is used to indicate the second information.
4. The method according to any one of claims 1-3, characterized in that, The first component package is a source code component package, and the configuration file is a source code file; or, the first component package is a binary component package, and the configuration file is a binary file.
5. The method according to claim 4, characterized in that, The first component package is a binary component package, and the configuration file is a binary file; The first platform writes the identification information into the configuration file to obtain the second component package, including: The first platform writes the identification information into the source code file after the configuration file is decompiled to obtain the second component package.
6. The method according to any one of claims 1-5, characterized in that, After obtaining the second component package, the method further includes: The first platform signs the second component package to obtain signature information; The first platform writes the identification information into the signature information; The first platform stores the signature information written into the identification information in the second component package.
7. The method according to any one of claims 1-6, characterized in that, The first platform includes at least one platform central repository; after the first platform generates the identification information of the first component package, the method further includes: The first platform stores the identification information in at least one of the platform central repositories; the identification information stored in the platform central repository is used to verify the second component package obtained by other platforms to determine the integration status of the second component package in the application.
8. The method according to any one of claims 1-7, characterized in that, The second platform parses the software package to obtain a first file, including: The second platform unpacks the software package to obtain a second file; the second file includes a file generated after compiling the application's source code and application configuration file. The second platform obtains the first file from the second file.
9. The method according to any one of claims 1-8, characterized in that, The method further includes: If the identification information exists on the first platform, the second platform determines that the identification information has been successfully verified. If the identification information is not present on the first platform, the second platform determines that the identification information verification has failed.
10. A component package marking method, characterized in that, Applied to a first platform, the first platform being used to provide at least one component package; the method includes: Receive the first component package; Generate identification information for the first component package; the identification information is used to uniquely identify the first component package; Write the identification information into the configuration file of the first component package to obtain the second component package; the second component package is used to integrate into the first application to implement the first function of the first application; receive information sent by the second platform to indicate the integration status of the second component package in the application.
11. A method for detecting the integration of component packages, characterized in that, The method is applied to a second platform, which provides a software package for at least one application; the method includes: Receive the software package of the first application; The software package is parsed to obtain a first file; the first file includes a file after compiling the configuration file of the component package, the configuration file includes the identification information of the component package, the identification information is information generated by the first platform for the component package to uniquely identify the component package, and the first platform is used to provide at least one component package; Based on the first document, obtain the identification information; If the identification information is successfully verified, it is determined that the first application integrates the second component package corresponding to the identification information; Send information to the first platform to indicate the integration status of the second component package in the application.
12. A first platform, characterized in that, The first platform is used to provide at least one component package: The first platform includes: A component receiving unit is used to receive the first component package; An identification management unit is used to generate identification information for the first component package; the identification information is used to uniquely identify the first component package. A component management unit is used to write the identification information into the configuration file of the first component package to obtain a second component package; the second component package is used to be integrated into the first application to implement the first function of the first application. The information receiving unit is used to receive information sent by the second platform that indicates the integration status of the second component package in the application.
13. A second platform, characterized in that, The second platform is used to provide a software package for at least one application; The second platform includes: A software package receiving unit is used to receive the software package of the first application; A parsing unit is used to parse the software package to obtain a first file; the first file includes a file after compiling the configuration file of the component package, the configuration file includes the identification information of the component package, the identification information is information generated by the first platform for the component package to uniquely identify the component package, and the first platform is used to provide at least one component package; The parsing unit is also configured to obtain identification information based on the first file; An integrated detection unit is used to determine, if the identification information is successfully verified, that the first application has integrated the second component package corresponding to the identification information; The information sending unit is used to send information to the first platform to indicate the integration status of the second component package in the application.
14. An electronic device, characterized in that, The device includes a memory and one or more processors; the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the component package marking method as described in claim 10, or cause the electronic device to perform the component package integration detection method as described in claim 11.
15. A computer-readable storage medium, characterized in that, The method includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the component package marking method as described in claim 10, or cause the electronic device to perform the component package integration detection method as described in claim 11.
16. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the component package marking method as described in claim 10, or causes the computer to perform the component package integration detection method as described in claim 11.