Application binary file normalization method and system

By establishing an application binary file standard library, the system automatically identifies and processes binary files of the Kylin operating system, solving compatibility issues caused by non-standard binary packages, achieving efficient adaptation and standardized processing of the Kylin system, and improving ecosystem adaptation efficiency.

CN116302588BActive Publication Date: 2026-04-17KYLIN CORP
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
KYLIN CORP
Filing Date
2022-09-08
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing technologies have compatibility issues caused by non-standard binary packages during the adaptation process of the domestic operating system Kylin ecosystem. In particular, the Lintian inspection tool is not fully applicable to the Kylin operating system, and it has many inspection items, high costs, and lacks differentiated inspections for different application types, which increases the difficulty and cost of adaptation.

Method used

Establish an application binary file specification library, identify application categories and extract inspection strategies, conduct comprehensive specification checks, and generate binary deb packages that conform to the Kylin system, including general and proprietary specifications. Automatically identify application categories and perform specification processing, and automatically generate specification-compliant deb packages.

Benefits of technology

It improves the efficiency of binary file inspection in the Kylin operating system, ensures the standardization and compatibility of applications, reduces adaptation costs, improves the efficiency of ecosystem expansion, and simplifies the standardization process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116302588B_ABST
    Figure CN116302588B_ABST
Patent Text Reader

Abstract

The application relates to an application binary file standardization processing method and system, and the method comprises the following steps: establishing an application binary file standard library according to a system specification system file; obtaining a list of application binary files to be processed, identifying an application category according to a file attribute, and extracting a corresponding checking strategy; performing standard checking on the file according to the checking strategy; determining, by a user, whether to perform standardization processing on a non-standard list; packaging the processed application binary file to obtain a deb application package; recording process log information and test results, and archiving the deb application package. According to the application, a corresponding standard library is established according to a software and hardware specification system file, checking rules are automatically identified and extracted, standardization checking and processing of the binary file are completed, and a standard deb package is automatically generated. According to the application, a binary file standard library can be established according to core specifications which independently affect the compatibility of an operating system, the checking efficiency is improved, and the standardization and compatibility of the application on the operating system are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of file package standardization technology, specifically to a method and system for applying binary file standardization processing. Background Technology

[0002] Currently, the adaptation of domestic operating system ecosystems mainly targets binary packages, i.e., deb packages. During the adaptation testing process, a series of compatibility issues often arise due to non-standard software packages. For example, inconsistencies between the desktop file name and the package name can cause icons to not display, and errors in printer filter file permissions and status can lead to printing failures. These issues severely impact adaptation speed and efficiency. With the rapid development of the domestic operating system ecosystem, more and more third-party vendors are establishing ecosystem partnerships with Kylin, facing a large number of software adaptation needs. How to quickly identify and address standardization issues in deb packages to ensure their standardization and compatibility, thereby improving adaptation efficiency, has become an urgent problem to be solved.

[0003] The Debian specification sets general technical requirements for binary packages and recommends using the officially designated checking tool Lintian to ensure application compliance. However, this still cannot completely solve application compatibility issues. Although the Kylin Desktop Operating System is derived from the Ubuntu distribution, it has its own independent characteristics as a commercial distribution, resulting in differences in the handling of software and hardware binary files. Therefore, software packages developed based on the Debian specification may still encounter compatibility issues on the Kylin Operating System.

[0004] The Lintian specification checking tool, based on the Debian specification, is the official Debian-recommended general specification checking tool for binary packages. It checks numerous and detailed items, resulting in a high technical barrier and usage cost. Only a small number of vendors use it, as most partner vendors lack the relevant technical expertise and provide non-standard deb packages, leading to compatibility issues during adaptation and increasing the difficulty and cost of adaptation. Currently, the main problems are as follows:

[0005] 1. Lintian's general rules for binary deb application packages in the Debian system do not include specifications specific to commercial operating system distributions, and are not entirely applicable to the Kylin operating system; in addition, it supports only a limited range of categories and lacks differentiated checks for different application types such as software and peripherals (printers, scanners).

[0006] 2. Lintian is based on the Debian specification, with nearly 700 check items. The test report needs to be analyzed item by item, which is costly and has low adoption. In addition, it has not been standardized, so users need to recreate the software package.

[0007] Other related technologies, such as [Chinese Invention, Chinese Invention License] CN114706564A, which describes a method, apparatus, electronic device, and storage medium for creating software packages, involve generating a package name and target directory based on user input of the application type and original software package, and then generating target files and packaging them based on the original software package. The following problems exist:

[0008] 1. This invention is based on the original software package packaging process and does not involve standardized checks and processing;

[0009] 2. This invention only considers the unified processing of package formats for application software classes (such as application classes, runtime environment classes, and intermediate component classes), and does not consider the case of peripheral classes. Summary of the Invention

[0010] To address the shortcomings of existing technologies, this invention provides a method for applying binary file normalization processing, comprising the following steps:

[0011] Step S1: Establish an application binary file specification library based on the system specification system document. The key attributes of the specification library include specification type, application category, inspection items and corresponding inspection rules.

[0012] Step S2: Obtain a list of application binary files to be processed, identify the application category based on the application binary file attributes, and extract the corresponding inspection strategy from the application binary file specification library based on the application category. The inspection strategy includes inspection items and inspection rules.

[0013] Step S3: Perform a comprehensive compliance check on the application binary file according to the inspection strategy to obtain a list of all non-compliance items. The list of non-compliance items includes inspection items, inspection rules, and compliance handling suggestions.

[0014] Step S4: Display the list of non-standard items and let the user determine whether standardization is required; if so, modify each item according to the standardization suggestions; otherwise, skip this step.

[0015] Step S5: Package the processed application binary file to obtain a binary deb application package;

[0016] Step S6: Record process log information and test results, and archive the binary deb application package.

[0017] In step S1, the specification types include general specifications and proprietary specifications. General specifications are basic specifications that must be followed regardless of application category, while proprietary specifications are specification definitions specific to different application categories, including specific specifications for application software, printer drivers, and scanner drivers.

[0018] In step S2, the application category is identified by traversing the application binary files to be processed and checking whether the application binary file name contains keyword dictionary related fields.

[0019] In step S2, the extraction and inspection strategy includes the following steps:

[0020] Step S21: Obtain the check items corresponding to the general specifications in the application binary file specification library;

[0021] Step S22: Obtain the check items corresponding to the proprietary specifications based on the identified application category;

[0022] Step S23: Obtain the inspection rules based on the inspection items obtained in steps S21 and S22.

[0023] The step S4 is followed by: standardization processing based on the user's selection. Standardization processing refers to obtaining the corresponding standardization processing method for non-standard inspection items according to the inspection rules.

[0024] The present invention further provides an application binary file normalization processing system for implementing the above method, comprising:

[0025] The specification definition module is used to establish an application binary file specification library based on the system specification system documents. The key attributes of the specification library include specification type, application category, inspection items, and the inspection rules corresponding to the inspection items.

[0026] Rule recognition module: Identifies application categories based on application binary file attributes, and extracts corresponding inspection strategies from the application binary file specification library based on the application category. The inspection strategy includes inspection items and inspection rules.

[0027] Standardization check module: Used to perform a comprehensive standardization check on the application binary file according to the check strategy;

[0028] The file processing module is used to confirm the content to be standardized based on the user's selection of the non-standard list, process it one by one according to the corresponding standard processing suggestions, and generate a binary deb application package.

[0029] Results collection module: Used to store the binary deb application package generated after the user's binary file normalization process, and to collect log information and test results generated during the normalization check process.

[0030] This invention provides a method and system for standardizing binary files. It establishes a corresponding standard library based on software and hardware specification system documents, automatically identifies and extracts inspection rules, completes the standardization inspection and processing of binary files, and automatically generates standardized deb packages. This invention can, considering the independent characteristics of operating systems, filter core specifications that affect compatibility to establish a binary file standard library, unify software and hardware package formats, improve inspection efficiency, and ensure the standardization and compatibility of applications on operating systems. Attached Figure Description

[0031] Figure 1 : Flowchart of the implementation of the binary file normalization processing method of the present invention.

[0032] Figure 2 The flowchart for constructing the binary file specification library of this invention.

[0033] Figure 3 The system framework diagram of the binary file normalization processing system of this invention is shown. Detailed Implementation

[0034] To gain a better understanding of the technical solution and beneficial effects of the present invention, the technical solution of the present invention and its beneficial effects are described in detail below with reference to the accompanying drawings.

[0035] Based on the many shortcomings of existing technologies, the present invention applies a binary file standardization processing method and system, which aims to avoid compatibility issues between application files and operating systems, thereby improving application quality, increasing adaptation efficiency, and accelerating ecosystem expansion.

[0036] Figure 1 This is a flowchart illustrating the implementation of the binary file normalization processing method of the present invention, combined with... Figure 1 The implementation process of the binary file normalization processing method is described in detail in a preferred embodiment of the present invention.

[0037] 1. Establish an application binary file specification library based on the operating system hardware and software specification system documents.

[0038] Integrate the standard system documents, extract inspection items based on the standard content, and formulate corresponding inspection rules and pass standards to establish an application binary file standard library. The key attributes of the standard library include standard type, application package category, inspection items, and corresponding inspection rules. Standard types are divided into general standards and proprietary standards. For specific processes and attribute descriptions, please refer to [references to be inserted here]. Figure 2 And Table 1.

[0039] Table 1: Description of key attributes of a binary file specification library for a certain application

[0040] Standard type Application Category Alias Inspection items Inspection rules General Specifications comprehensive common <Inspection Item 1> <Regular expression 1> proprietary standards Application software software <Inspection Item 2> <Regular expression 2> proprietary standards Printer driver printer <Inspection Item 3> <Regular expression 3> proprietary standards Scanner driver scanner <Inspection Item 4> <Regular expression 4>

[0041] 1) The standard types are general standards and proprietary standards, among which:

[0042] General specifications: These are the basic specifications that must be followed regardless of the application category, such as: basic application information such as package name, version number, etc., key field definitions in control files, key field definitions in desktop files, etc.

[0043] Proprietary Specifications: These are further divided into application software, printer, and scanner-specific specifications based on application category. They mainly refer to the specification definitions specific to different application categories. For example, software must include a desktop file and the file name must match the package name; printer drivers must include a ppd file with 644 permissions; and scanner drivers must include a libsane driver file.

[0044] 2) Application package categories are mainly defined according to the Kylin Desktop packaging specifications to distinguish between software and hardware, such as software, printers, scanners, etc.

[0045] 3) The inspection items are defined according to the normalization of the application binary file content;

[0046] 4) Inspection rules are regular expression rule tables defined for inspection items, used to define the pass / fail criteria for each inspection item. For example, the inspection rule for the Package field in the control file is "Package:

[0047] [az][a-z0-9.+\-]{1,}"

[0048] 2. Obtain a list of application binary files, such as application file storage directories and non-standard deb packages; automatically identify the current application category and extract the corresponding inspection strategy (consisting of application inspection items and corresponding inspection rules) based on the standard library information in step 1. Automatic application category identification involves traversing the application files to be processed and checking whether the file names contain relevant fields from a keyword dictionary to identify the application category.

[0049] The specific keyword dictionary contents are as follows:

[0050] 1) If the application file name contains the keyword *.ppd, then the application category to be processed is printer;

[0051] 2) If the application file name contains the keyword libsane*, then the application category to be processed is scanner;

[0052] 3) If the application file name does not contain *.ppd or libsane*, then the application to be processed is classified as application software;

[0053] Methods for extracting inspection strategies for applications of the corresponding category include:

[0054] 1) First, obtain the general specification check items from the specification library.

[0055] 2) Then, obtain the corresponding proprietary specification check items based on the application category;

[0056] Example: Traverse the list of application files to be processed, and match the two file keywords *.ppd and libsane*. Therefore, the current application category is identified as printer application and scanner application. Based on the current application category, obtain the printer driver and scanner driver specification check items from the proprietary specification check items.

[0057] 3) Obtain the corresponding inspection rule information based on the inspection items;

[0058] 3. Following the inspection strategy in step 2, perform a standardization check on the application binary file. Determine whether the application binary file conforms to the standard based on the regular expression check rule table, and obtain all non-standard items. The standardization check refers to checking the existence and standardization of the current application's basic information and different types of application files.

[0059] Example: If the application package is a printer driver type application, the following are some details of the checks performed according to the checking strategy:

[0060] 1) The general specification check item is "Validity check of the Package field in the control file". The check rule is "Valid characters only include "az", "0-9", ".", "-", and "+", and must start with a letter". The regular expression is "[az][a-z0-9.+\-]{1,}".

[0061] 2) The proprietary specification check item is: "Printer driver document storage compliance check"; the check rule is "whether the storage path is . / usr / share / cups / model / ${firm}", and the regular expression is " / usr / lib / cups / filter / .+".

[0062] 4. Compare all non-standard inspection items in step 3, and show the inspection results and corresponding inspection rule descriptions to the user. The user can then check the inspection items to confirm the content that needs to be modified, and determine whether there are any inspection items that need to be standardized.

[0063] If so: Continue to standardize the process according to the "Standardized Processing Suggestions" and modify each item accordingly;

[0064] If not: Skip.

[0065] The standardization process refers to the method (type, action, method) for obtaining the corresponding standardization processing for non-standard inspection items according to the inspection rules, which is explained in detail below:

[0066] Table 2: A specification processing suggestion for this invention

[0067] type action method Information is not standardized Terminal Interaction The terminal guides the user to input valid fields. File missing Terminal Interaction The terminal guides the user to complete the missing files. non-standard path Automatic processing Automatically perform standardized operations (file permission modification, location relocation, etc.)

[0068] An example of standardizing non-standard paths is as follows: When performing a "Printer driver document storage standardization check", if the filter storage path is found to be non-standard, the file will be automatically moved to " / usr / lib / cups / filter".

[0069] Finally, after all non-standard items have been processed, binary packaging is performed to generate a deb application package.

[0070] 5. Record the process and test results of the binary deb application package standardization check. After the application binary file standardization is completed, generate a unified package standardization check test report, running log, and the binary deb application package generated after standardization.

[0071] According to the method provided in the above embodiments of the present invention, when performing standardization checks and processing on application binary files, an application binary file standard library matching the Kylin Desktop packaging standard can be defined. The application category is automatically identified using the information of the application binary files to be processed, and the corresponding check rules in the standard library are extracted. Standardization checks and processing are performed on each application binary file according to the check rules, generating a binary deb application package. Standardization check process logs and test reports are collected, and the binary deb application package generated after standardization processing of the application binary files is stored. Based on the solution of the embodiments of the present invention, it can be applied to the standardization checks and processing of binary files corresponding to different categories of applications, and generates binary deb application packages that comply with the Kylin standard. This solves the adaptation and compatibility problems caused by non-compliance with the standard, unifies the software and hardware package formats, facilitates the ecosystem adaptation process, improves the quality of software and hardware products, and increases the overall ecosystem adaptation efficiency.

[0072] See Figure 3 As shown, this is the binary file normalization processing system 100 provided by the present invention. This system is based on the same inventive concept as the aforementioned normalization processing method, and its problem-solving principle is similar to the aforementioned testing method; therefore, the repetitive parts will not be described in detail again.

[0073] The system includes a specification definition module 101, a rule recognition module 102, a specification check module 103, a document processing module 104, and a result collection module 105.

[0074] Specification definition module 101: Used to establish an application binary file specification library based on the system software and hardware specification system files. The key attributes of the specification library include specification type, application package category, inspection items and corresponding inspection rules.

[0075] Rule recognition module 102: used to automatically identify the application category based on the application binary file attributes, and extract the corresponding inspection strategy (composed of application inspection items and corresponding inspection rules) from the specification library according to the category.

[0076] Standardization Check Module 103: Performs a comprehensive standardization check on the application binary file according to the standardization check strategy.

[0077] File processing module 104: It is used to confirm the content to be standardized based on the user's selection of the non-standard list, process them one by one according to the corresponding standard processing suggestions, and generate a binary deb application package.

[0078] Result collection module 105: Stores the binary deb package generated after binary file normalization processing, and collects logs and reports generated during the normalization check process.

[0079] The system provided by the above embodiments of the present invention can define an application binary file specification library, identify the application category to be processed, extract the check items and check rules from the corresponding binary file specification library according to the application category, and perform binary file standardization checks according to the standardization check strategy. The user confirms the content to be standardized and processes it, generating a deb application package. Simultaneously, detailed logs and standardization check test results are recorded during the check process. This system can standardize binary application files for the Kylin desktop operating system and has a wide range of applications. At the same time, it maximizes the compatibility of desktop hardware and software, improving the overall ecosystem adaptation efficiency.

[0080] The binary files used in this invention refer to binary deb packages and their internal files.

[0081] The application binary file standardization processing method and system provided by this invention can be applied to various operating systems, especially the Kylin operating system.

[0082] This invention addresses the unique characteristics of the Kylin operating system by filtering core specifications that affect compatibility and establishing a binary file specification library. This improves inspection efficiency while ensuring application compatibility and compliance. Specifically, it achieves the following three effects:

[0083] 1. Add standardized checking rules to differentiate between software and hardware categories, establish a binary file processing standard library, which is strongly related to the Kylin Desktop packaging standard to avoid compatibility issues later.

[0084] 2. It can automatically identify application types, extract corresponding inspection rules from the specification library to check the standardization of application files, process non-standard files, and automatically generate standard-compliant deb packages. It provides a well-interactive package creation process for standardization checks and processing, helping partner manufacturers save manpower and time costs, improve adaptation efficiency, and accelerate ecosystem expansion.

[0085] 3. The loosely coupled design that separates test objects, inspection items, and inspection rules means that when the specification is updated, there is no need to modify the functional code; you can directly modify the inspection rules in the specification library. This design has good maintainability and scalability, reducing maintenance costs.

[0086] Although the present invention has been described using the above preferred embodiments, it is not intended to limit the scope of protection of the present invention. Any changes and modifications made by those skilled in the art to the above embodiments without departing from the spirit and scope of the present invention shall still fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be defined by the claims.

Claims

1. A binary file normalization processing method, characterized in that, Includes the following steps: Step S1: Establish an application binary file specification library based on the system specification system document. The key attributes of the specification library include specification type, application category, inspection items and corresponding inspection rules. The types of specifications include general specifications and proprietary specifications. General specifications are basic specifications that must be followed regardless of the application category, while proprietary specifications are normative definitions specific to different application categories, including specific specifications for application software, printer drivers, and scanner drivers. Step S2: Obtain a list of application binary files to be processed, identify the application category based on the application binary file attributes, and extract the corresponding inspection strategy from the application binary file specification library based on the application category. The inspection strategy includes inspection items and inspection rules. Step S3: Perform a comprehensive compliance check on the application binary file according to the inspection strategy to obtain a list of all non-compliance items. The list of non-compliance items includes inspection items, inspection rules, and compliance handling suggestions. Step S4: Display the list of non-standard items and let the user determine whether standardization is required; if so, modify each item according to the standardization suggestions; otherwise, skip this step. Step S5: Package the processed application binary file to obtain a binary deb application package; Step S6: Record process log information and test results, and archive the binary deb application package.

2. The binary file normalization processing method as described in claim 1, characterized in that, In step S2, the application category is identified by traversing the application binary files to be processed and checking whether the application binary file name contains keyword dictionary related fields.

3. The binary file normalization processing method as described in claim 1, characterized in that, In step S2, the extraction and inspection strategy includes the following steps: Step S21: Obtain the check items corresponding to the general specifications in the application binary file specification library; Step S22: Obtain the check items corresponding to the proprietary specifications based on the identified application category; Step S23: Obtain the inspection rules based on the inspection items obtained in steps S21 and S22.

4. The binary file normalization processing method as described in claim 1, characterized in that, The step S4 is followed by: standardization processing based on the user's selection. Standardization processing refers to obtaining the corresponding standardization processing method for non-standard inspection items according to the inspection rules.

5. A binary file normalization processing system for implementing the binary file normalization processing method as described in any one of claims 1-4, characterized in that... include: The specification definition module is used to establish an application binary file specification library based on the system specification system documents. The key attributes of the specification library include specification type, application category, inspection items, and the inspection rules corresponding to the inspection items. Rule recognition module: Identifies application categories based on application binary file attributes, and extracts corresponding inspection strategies from the application binary file specification library based on the application category. The inspection strategy includes inspection items and inspection rules. Standardization check module: Used to perform a comprehensive standardization check on the application binary file according to the check strategy; The file processing module is used to confirm the content to be standardized based on the user's selection of the non-standard list, process it one by one according to the corresponding standard processing suggestions, and generate a binary deb application package. Results collection module: Used to store the binary deb application package generated after the user's binary file normalization process, and to collect log information and test results generated during the normalization check process.

Citation Information

Patent Citations

  • Software package making method and device, electronic equipment and storage medium

    CN114706564A

  • Rule inspection program, rule inspection method, and rule inspection device

    JP2009099111A