Data insertion method and device for installation package, electronic equipment and storage medium

By inserting personalized data according to user needs in the installation package, the problem of high installation package deployment and high maintenance costs in the existing technology, and the flexibility and efficiency of the installation package.

CN119376788AInactive Publication Date: 2025-01-28BEIJING THREATBOOK TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411933735.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-01-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When inserting data into the installation package, the prior art increases the difficulty of the customer's installation, poor user experience, and generating an exclusive installation package for each customer will lead to high maintenance costs.

Method used

By obtaining user download needs, extraction of personalized data, and inserting the data into the installation package in different ways according to the installation type of the installation package, so that the installation package can adjust the adaptive adjustment according to customer needs.

Benefits of technology

The deployment difficulty of the installation package is easy to download many times, reducing maintenance costs, and improving the stability and operating efficiency of the installation package.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119376788A_ABST
    Figure CN119376788A_ABST
Patent Text Reader

Abstract

The invention provides a data insertion method and device for an installation package, electronic equipment and a storage medium, and the method comprises the steps: obtaining a downloading demand of a user; extracting personalized data in the downloading demand; selecting an installation type of an installation package according to the installation information in the downloading demand; and inserting the personalized data into a corresponding installation package according to the installation type. By implementing the application, the personalized information of the customer can be inserted into the installation package, so that the installation package can be adaptively adjusted according to the demand of the customer, the deployment difficulty of the installation package is reduced, the installation package is convenient to download for multiple times, and the maintenance cost can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security technology, and in particular to a method, device, electronic device and storage medium for inserting data into an installation package. Background Art

[0002] Client software products are usually provided to customers in the form of software packages, which require compiling binary files, packaging binary files and resource files into installation packages (where different client systems have different installation package formats), and signing the installation package files before publishing them on the website for customers to download. However, the installation packages downloaded by different customers are exactly the same, and it is impossible to provide personalized and differentiated services to each customer. Therefore, it is very important to add user requirements to the installation package.

[0003] The existing technology has many disadvantages when inserting data into the installation package. For example, it increases the installation difficulty for customers and poor user experience; it is necessary to ensure that the file name is not modified after the installation package is downloaded, but in practice, it is easy for the file name to be modified; if the installation package is software for corporate customers, each corporate employee is required to log in separately, which increases the difficulty of deploying the installation package; if the number of customers is very large, generating an exclusive installation package for each customer will result in huge maintenance costs. Summary of the invention

[0004] The purpose of the present application is to provide a method, device, electronic device and storage medium for inserting data into an installation package, which can insert the customer's personalized information into the installation package, so that the installation package can be adaptively adjusted according to the customer's needs, reducing the deployment difficulty of the installation package, facilitating multiple downloads, and reducing maintenance costs.

[0005] In a first aspect, an embodiment of the present application provides a method for inserting data into an installation package, the method comprising: Obtain the user's download requirements; Extracting personalized data from the download request; Selecting an installation type of the installation package according to the installation information in the download requirement; The personalized data is inserted into the corresponding installation package according to the installation type.

[0006] In the above implementation process, different methods are used to insert the user's personalized data into the installation package according to the installation type of the installation package. The customer's personalized information can be inserted into the installation package, so that the installation package can be adaptively adjusted according to customer needs, reducing the deployment difficulty of the installation package, facilitating multiple downloads, and reducing maintenance costs.

[0007] Furthermore, the step of inserting the personalized data into the corresponding installation package according to the installation type includes: If the installation type is the first type, the corresponding installation package is a first file, and the personalized data is inserted into the first file according to a first method to obtain the installation package after the data is inserted; If the installation type is the second type, the corresponding installation package is the second file, and the personalized data is inserted into the second file according to the second method to obtain the installation package after the data is inserted; If the installation type is the third type, the corresponding installation package is a third file, and the personalized data is inserted into the third file according to a third method to obtain the installation package after the data is inserted.

[0008] In the above implementation process, personalized data is inserted in different ways according to the installation type, which can avoid the impact of data insertion on the installation package and improve the stability and operation efficiency of the installation package.

[0009] Furthermore, the step of inserting the personalized data into the first file according to the first method to obtain the installation package after the data is inserted includes: Determining whether the first file contains signature information; If yes, insert the personalized data into the first file according to the signature information to obtain an installation package after the data is inserted; If not, data insertion fails.

[0010] In the above implementation process, it is determined whether the first file contains signature information, and data insertion processing can be performed on the first file according to its characteristics, which can simplify the data insertion process and improve the stability of the first file.

[0011] Furthermore, the step of inserting the personalized data into the first file according to the signature information to obtain the installation package after the data is inserted includes: Filling the personalized data into the signature information to obtain a filled first file; Expanding the filled first file to a first threshold file size to obtain an expanded first file; Obtain a target field in the expanded first file; Verify the target field according to the signature information to obtain a verification result; If the verification result is valid, the target field is overwritten into the file header of the filled first file to obtain the installation package after the data is inserted.

[0012] In the above implementation process, personalized data is filled into the signature information, and then the filled first file is expanded to determine whether the filled first file can be verified. This can improve the data insertion efficiency of the first file and reduce the risk of data insertion failure.

[0013] Furthermore, the step of verifying the target field according to the signature information includes: Obtaining the signature length in the signature information; Obtaining preset length data according to the signature length and the padding length; The length data of the target field is compared with the preset length data. If the length data of the target field is equal to the preset length data, the verification result is valid; if the length data of the target field is not equal to the preset length data, the verification result is invalid.

[0014] In the above implementation process, the preset length data is obtained according to the signature length, and then the preset length is compared with the length data of the target field, which can ensure the rationality and validity of the first file after the data is inserted and improve the availability of the first file.

[0015] Furthermore, the step of inserting the personalized data into the second file according to the second method to obtain the installation package after the data is inserted includes: Determining whether the second file is legal; If so, obtain the structure size of the second file, obtain the end position of the data pile of the second file according to the structure size, insert the personalized data into the second file, and obtain the installation package after the data is inserted.

[0016] In the above implementation process, it is determined whether the second file is legal, and data is inserted into the second file according to its characteristics, simplifying the data insertion process. At the same time, it is ensured that the inserted data will not damage the structure of the second file, thereby effectively maintaining the stability of the second file.

[0017] Furthermore, the step of inserting the personalized data into the third file according to the third method to obtain the installation package after the data is inserted includes: Determining whether the third file is legal; If so, fill a preset data block at the end of the third file, fill the personalized data into the preset data block, obtain the filled third file, expand the filled third file to the second threshold file size, and obtain the installation package after the data is inserted.

[0018] In the above implementation process, data is inserted according to the file characteristics of the third file, so that the personalized data can be completely inserted into the third file without affecting the installation of the third file, thereby improving the efficiency and security of data insertion.

[0019] In a second aspect, an embodiment of the present application further provides a device for inserting data into an installation package, the device comprising: The acquisition module is used to obtain the user's download requirements; An extraction module, used to extract personalized data in the download request; A selection module, used to select an installation type of the installation package according to the installation information in the download requirement; An insertion module is used to insert the personalized data into a corresponding installation package according to the installation type.

[0020] In the above implementation process, different methods are used to insert the user's personalized data into the installation package according to the installation type of the installation package. The customer's personalized information can be inserted into the installation package, so that the installation package can be adaptively adjusted according to customer needs, reducing the deployment difficulty of the installation package, facilitating multiple downloads, and reducing maintenance costs.

[0021] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of the first aspects when executing the computer program.

[0022] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which instructions are stored. When the instructions are executed on a computer, the computer executes the method as described in any one of the first aspects.

[0023] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a computer, enables the computer to execute the method as described in any one of the first aspects.

[0024] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.

[0025] And it can be implemented according to the contents of the specification. The following is a detailed description of the preferred embodiments of the present application with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the range values. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0027] Figure 1 A schematic diagram of a flow chart of a method for inserting data into an installation package provided in an embodiment of the present application; Figure 2 A schematic diagram of the structure of a device for inserting data into an installation package provided in an embodiment of the present application; Figure 3 A schematic diagram of the structural composition of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0029] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0030] The specific implementation methods of the present application are further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present application, but are not used to limit the scope of the present application.

[0031] Embodiment 1 Figure 1 is a flow chart of a method for inserting data into an installation package provided in an embodiment of the present application, such as Figure 1 As shown, the method includes: S1, obtain the user's download requirements; S2, extracting personalized data from the download requirements; S3, selecting the installation type of the installation package according to the installation information in the download requirement; S4, inserting the personalized data into the corresponding installation package according to the installation type.

[0032] In the above implementation process, different methods are used to insert the user's personalized data into the installation package according to the installation type of the installation package. The customer's personalized information can be inserted into the installation package, so that the installation package can be adaptively adjusted according to customer needs, reducing the deployment difficulty of the installation package, facilitating multiple downloads, and reducing maintenance costs.

[0033] The present application provides a method for inserting personalized data into installation packages of different platforms, which can insert personalized data while the installation package is running without destroying the signature of the installation package, and can provide differentiated installation methods according to user needs.

[0034] In S1 and S2, the user's personalized data is extracted according to the user's download requirements, and the personalized data is used to insert into the original installation package to generate a new installation package, and then the new installation package is returned to the user.

[0035] In S3, the embodiment of the present application implements data insertion by judging the installation type of the installation package. The installation package is formed by packaging binary and resource files. Among them, the installation package on the Windows system is a portable executable file (Portable Executable, PE), the installation package on the macOS system is a PKG file (a software package format), and the installation package of the Xinchuang Tongxin and Kylin desktop system is a DEB file (a software package format), etc. The embodiment of the present application can be applied to a variety of installation package types and perform data insertion on a variety of different file types.

[0036] Furthermore, S4 includes: If the installation type is the first type, the corresponding installation package is the first file, and the personalized data is inserted into the first file according to the first method to obtain the installation package after the data is inserted; If the installation type is the second type, the corresponding installation package is the second file, and the personalized data is inserted into the second file according to the second method to obtain the installation package after the data is inserted; If the installation type is the third type, the corresponding installation package is a third file, and the personalized data is inserted into the third file according to the third method to obtain the installation package after the data is inserted.

[0037] In the above implementation process, personalized data is inserted in different ways according to the installation type, which can avoid the impact of data insertion on the installation package and improve the stability and operation efficiency of the installation package.

[0038] The first type in the embodiment of the present application is the installation of the Windows system, and the corresponding first file is the PE file; the second type is the installation of the macOS system, and the corresponding second file is the PKG file; the third type is the installation of the Xinchuang Tongxin and Kylin desktop system, and the corresponding third file is the DEB file.

[0039] Furthermore, the step of inserting the personalized data into the first file according to the first method to obtain the installation package after the data is inserted includes: Determining whether the first file contains signature information; If so, insert the personalized data into the first file according to the signature information to obtain an installation package after the data is inserted; If not, data insertion fails.

[0040] In the above implementation process, it is determined whether the first file contains signature information, and data insertion processing can be performed on the first file according to its characteristics, which can simplify the data insertion process and improve the stability of the first file.

[0041] The Windows system software installation package is a PE file. The PE file header indicates the location and size of the signature information in the file. This part of the data does not participate in the file hash calculation when verifying the validity of the file signature.

[0042] Therefore, as long as the scope of this area is expanded and the personalized data is inserted after the original signature information, the validity of the signature can be inserted without destroying the data.

[0043] Further, the step of inserting the personalized data into the first file according to the signature information to obtain the installation package after the data is inserted includes: Filling the personalized data into the signature information to obtain a filled first file; Expanding the filled first file to a first threshold file size to obtain an expanded first file; Get the target field in the expanded first file; Verify the target field according to the signature information and obtain the verification result; If the verification result is valid, the target field is overwritten into the file header of the filled first file to obtain the installation package after data insertion.

[0044] In the above implementation process, personalized data is filled into the signature information, and then the filled first file is expanded to determine whether the filled first file can be verified. This can improve the data insertion efficiency of the first file and reduce the risk of data insertion failure.

[0045] Expand the first file after filling to an integer multiple of 8 bytes (the first threshold file size). Only when the size of the first file after filling the signature information remains an integer multiple of 8 bytes can the system recognize the signature information. Otherwise, it will be recognized as having no signature information. Therefore, if the file size is not an integer multiple of 8 bytes after inserting personalized data, it is necessary to continue to expand the data to make up for it.

[0046] Furthermore, the step of verifying the target field according to the signature information includes: Get the signature length in the signature information; Obtaining preset length data according to the signature length and padding length; The length data of the target field is compared with the preset length data. If the length data of the target field is equal to the preset length data, the verification result is valid. If the length data of the target field is not equal to the preset length data, the verification result is invalid.

[0047] In the above implementation process, the preset length data is obtained according to the signature length, and then the preset length is compared with the length data of the target field, which can ensure the rationality and validity of the first file after the data is inserted and improve the availability of the first file.

[0048] There is a field called checksum in the PE file header, which is generated by a verification algorithm. If the value of this field is not equal to the preset length data calculated by the current file, the system will determine that the signature information of the current file is invalid, that is, the verification result is invalid, so this field needs to be recalculated after filling the data.

[0049] Furthermore, the step of inserting the personalized data into the second file according to the second method to obtain the installation package after the data is inserted includes: Determining whether the second file is legal; If so, the structure size of the second file is obtained, the end position of the data heap of the second file is obtained according to the structure size, and the personalized data is inserted into the second file to obtain the installation package after the data is inserted.

[0050] In the above implementation process, it is determined whether the second file is legal, and data is inserted into the second file according to its characteristics, simplifying the data insertion process. At the same time, it is ensured that the inserted data will not damage the structure of the second file, thereby effectively maintaining the stability of the second file.

[0051] The second file consists of three parts: file header, data pile and file tail, among which the file signature only verifies the validity of the contents of the file header and data pile. Therefore, inserting personalized data between the data pile and the end of the file can achieve the insertion of data without destroying the validity of the signature information.

[0052] Furthermore, the step of inserting the personalized data into the third file according to the third method to obtain the installation package after the data is inserted includes: Determine whether the third party document is legal; If so, fill a preset data block at the end of the third file, fill the personalized data into the preset data block, obtain the filled third file, expand the filled third file to the second threshold file size, and obtain the installation package after the data is inserted.

[0053] In the above implementation process, data is inserted according to the file characteristics of the third file, so that the personalized data can be completely inserted into the third file without affecting the installation of the third file, thereby improving the efficiency and security of data insertion.

[0054] The DEB file is an extension of the AR format, consisting of an AR file header and multiple AR data blocks containing the installation compressed package data. The original DEB file is not signed, and the Xinchuang system has made further expansions on this basis, inserting an AR data block (preset data block) containing the file signature at the end of the original file to verify the validity of the AR data block containing the installation package data. Therefore, a new AR data block is inserted into the data packet containing the signature information. At this time, the file size must be an integer multiple of 2 bytes (the second threshold file size), and the personalized information is stored in this preset data block, which can achieve the insertion of data without destroying the validity of the signature information.

[0055] In an embodiment of the present application, an enterprise management software is developed for enterprise administrators to manage all computers installed with management client software from the background. A server is built and provides the enterprise administrator with the function of logging in and downloading the client installation package and viewing the number of clients currently installed in the enterprise.

[0056] Administrators of companies A and B use different corporate accounts to log in to the server, download and install the software from the server, and push it to the computers of their employees for execution.

[0057] The enterprise administrator logs in through the browser and clicks the download installation package button on the front-end page. The server receives the http request for downloading the client installation package initiated by the enterprise administrator from the browser. The server obtains the registration information of the currently logged-in enterprise administrator and inserts some enterprise identification information into the client installation package. The server returns the client installation package to the enterprise administrator, who pushes the installation package to the computers of the employees of the enterprise through other desktop management software and runs it.

[0058] When the installation package is running, it reads the inserted enterprise identification information from its own file and sends a registration request to the server. The server receives the registration request from the installation package, generates the corresponding session cookie and returns it to the installation package. The installation package saves the session cookie to a local file. After the enterprise management software client is installed and started, it automatically reads the cookie saved in the file and communicates with the server. The server associates the current client with the corresponding enterprise through the client's cookie and the enterprise information at the time of registration.

[0059] At this point, the administrator of Company A can associate the employee computers of Company A through the background but cannot manage the employee computers of Company B. The administrator of Company B can associate the employee computers of Company B through the background but cannot manage the employee computers of Company A.

[0060] The embodiment of the present application realizes the function that the same installation package can perceive different user environments and provide users with differentiated experiences through a method of dynamically inserting user personalized information into the installation package based on the server.

[0061] The data insertion method of the embodiment of the present application can perform customized data insertion without destroying the signature information of the original file. When the installation package is running, it parses the inserted data from its own file content and performs different actions according to the data content, thereby realizing the function of providing differentiated experience for different users with the same installation package.

[0062] Embodiment 2 In order to execute the method corresponding to the above embodiment 1 to achieve the corresponding functions and technical effects, a data insertion device for an installation package is provided below, such as Figure 2 As shown, the device comprises: Acquisition module 1, used to obtain the user's download requirements; Extraction module 2, used to extract personalized data in the download request; A selection module 3, used to select an installation type of the installation package according to the installation information in the download requirement; Insertion module 4 is used to insert the personalized data into the corresponding installation package according to the installation type.

[0063] In the above implementation process, different methods are used to insert the user's personalized data into the installation package according to the installation type of the installation package. The customer's personalized information can be inserted into the installation package, so that the installation package can be adaptively adjusted according to customer needs, reducing the deployment difficulty of the installation package, facilitating multiple downloads, and reducing maintenance costs.

[0064] Furthermore, the insertion module 4 is also used for: If the installation type is the first type, the corresponding installation package is the first file, and the personalized data is inserted into the first file according to the first method to obtain the installation package after the data is inserted; If the installation type is the second type, the corresponding installation package is the second file, and the personalized data is inserted into the second file according to the second method to obtain the installation package after the data is inserted; If the installation type is the third type, the corresponding installation package is a third file, and the personalized data is inserted into the third file according to the third method to obtain the installation package after the data is inserted.

[0065] In the above implementation process, personalized data is inserted in different ways according to the installation type, which can avoid the impact of data insertion on the installation package and improve the stability and operation efficiency of the installation package.

[0066] Furthermore, the insertion module 4 is also used for: Determining whether the first file contains signature information; If so, insert the personalized data into the first file according to the signature information to obtain an installation package after the data is inserted; If not, data insertion fails.

[0067] In the above implementation process, it is determined whether the first file contains signature information, and data insertion processing can be performed on the first file according to its characteristics, which can simplify the data insertion process and improve the stability of the first file.

[0068] Furthermore, the insertion module 4 is also used for: Filling the personalized data into the signature information to obtain a filled first file; Expanding the filled first file to a first threshold file size to obtain an expanded first file; Get the target field in the expanded first file; Verify the target field according to the signature information and obtain the verification result; If the verification result is valid, the target field is overwritten into the file header of the filled first file to obtain the installation package after data insertion.

[0069] In the above implementation process, personalized data is filled into the signature information, and then the filled first file is expanded to determine whether the filled first file can be verified. This can improve the data insertion efficiency of the first file and reduce the risk of data insertion failure.

[0070] Furthermore, the insertion module 4 is also used for: Get the signature length in the signature information; Obtaining preset length data according to the signature length and padding length; The length data of the target field is compared with the preset length data. If the length data of the target field is equal to the preset length data, the verification result is valid. If the length data of the target field is not equal to the preset length data, the verification result is invalid.

[0071] In the above implementation process, the preset length data is obtained according to the signature length, and then the preset length is compared with the length data of the target field, which can ensure the rationality and validity of the first file after the data is inserted and improve the availability of the first file.

[0072] Furthermore, the insertion module 4 is also used for: Determining whether the second file is legal; If so, the structure size of the second file is obtained, the end position of the data heap of the second file is obtained according to the structure size, and the personalized data is inserted into the second file to obtain the installation package after the data is inserted.

[0073] In the above implementation process, it is determined whether the second file is legal, and data is inserted into the second file according to its characteristics, simplifying the data insertion process. At the same time, it is ensured that the inserted data will not damage the structure of the second file, thereby effectively maintaining the stability of the second file.

[0074] Furthermore, the insertion module 4 is also used for: Determine whether the third party document is legal; If so, fill a preset data block at the end of the third file, fill the personalized data into the preset data block, obtain the filled third file, expand the filled third file to the second threshold file size, and obtain the installation package after the data is inserted.

[0075] In the above implementation process, data is inserted according to the file characteristics of the third file, so that the personalized data can be completely inserted into the third file without affecting the installation of the third file, thereby improving the efficiency and security of data insertion.

[0076] The data insertion device of the installation package can implement the method of the above embodiment 1. The options in the above embodiment 1 are also applicable to this embodiment and will not be described in detail here.

[0077] The rest of the contents of the embodiments of the present application can refer to the contents of the above-mentioned embodiment 1, and will not be repeated in this embodiment.

[0078] Embodiment 3 An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the data insertion method of the installation package of the first embodiment.

[0079] Optionally, the above-mentioned electronic device may be a server.

[0080] See also Figure 3 , Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 31, a communication interface 32, a memory 33 and at least one communication bus 34. The communication bus 34 is used to realize direct connection and communication between these components. The communication interface 32 of the device in the embodiment of the present application is used to communicate signaling or data with other node devices. The processor 31 may be an integrated circuit chip with signal processing capabilities.

[0081] The processor 31 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor 31 can also be any conventional processor, etc.

[0082] The memory 33 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electric erasable programmable read-only memory (EEPROM), etc. The memory 33 stores computer readable instructions. When the computer readable instructions are executed by the processor 31, the device can execute the above-mentioned Figure 1 The method embodiment involves various steps.

[0083] Optionally, the electronic device may further include a storage controller and an input / output unit. The memory 33, the storage controller, the processor 31, the peripheral interface, and the input / output unit are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components may be electrically connected to each other via a communication bus 34. The processor 31 is used to execute executable modules stored in the memory 33, such as software function modules or computer programs included in the device.

[0084] The input and output unit is used to provide users with the task creation and to create an optional time period or preset execution time for the task to enable interaction between the user and the server. The input and output unit can be, but is not limited to, a mouse and a keyboard.

[0085] Understandably, Figure 3 The structure shown is for illustration only. The electronic device may also include Figure 3 More or fewer components as shown, or with Figure 3 Different configurations are shown. Figure 3Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0086] In addition, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which implements the data insertion method of the installation package of the first embodiment when the computer program is executed by a processor.

[0087] The embodiment of the present application also provides a computer program product, which, when running on a computer, enables the computer to execute the method described in the method embodiment.

[0088] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart, can be implemented with a dedicated hardware-based device that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0089] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0090] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0091] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0092] The above is only a specific implementation of the present application, but the protection range of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical range disclosed in the present application, which should be included in the protection range of the present application. Therefore, the protection range of the present application should be based on the protection range of the claims.

[0093] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

Claims

1. A method for inserting data into an installation package, characterized in that: The method comprises: Obtain the user's download requirements; Extracting personalized data from the download request; Selecting an installation type of the installation package according to the installation information in the download requirement; The personalized data is inserted into the corresponding installation package according to the installation type.

2. The method for inserting data into an installation package according to claim 1, characterized in that: The step of inserting the personalized data into the corresponding installation package according to the installation type includes: If the installation type is the first type, the corresponding installation package is a first file, and the personalized data is inserted into the first file according to a first method to obtain the installation package after the data is inserted; If the installation type is the second type, the corresponding installation package is the second file, and the personalized data is inserted into the second file according to the second method to obtain the installation package after the data is inserted; If the installation type is the third type, the corresponding installation package is a third file, and the personalized data is inserted into the third file according to a third method to obtain the installation package after the data is inserted.

3. The method for inserting data into an installation package according to claim 2, characterized in that: The step of inserting the personalized data into the first file according to the first method to obtain the installation package after the data is inserted includes: Determining whether the first file contains signature information; If yes, insert the personalized data into the first file according to the signature information to obtain an installation package after the data is inserted; If not, data insertion fails.

4. The method for inserting data into an installation package according to claim 3, characterized in that: The step of inserting the personalized data into the first file according to the signature information to obtain an installation package after the data is inserted includes: Filling the personalized data into the signature information to obtain a filled first file; Expanding the filled first file to a first threshold file size to obtain an expanded first file; Obtain a target field in the expanded first file; Verify the target field according to the signature information to obtain a verification result; If the verification result is valid, the target field is overwritten into the file header of the filled first file to obtain the installation package after the data is inserted.

5. The method for inserting data into an installation package according to claim 4, characterized in that: The step of verifying the target field according to the signature information includes: Obtaining the signature length in the signature information; Obtaining preset length data according to the signature length and the padding length; The length data of the target field is compared with the preset length data. If the length data of the target field is equal to the preset length data, the verification result is valid; if the length data of the target field is not equal to the preset length data, the verification result is invalid.

6. The method for inserting data into an installation package according to claim 2, characterized in that: The step of inserting the personalized data into the second file according to the second method to obtain the installation package after the data is inserted includes: Determining whether the second file is legal; If so, obtain the structure size of the second file, obtain the end position of the data pile of the second file according to the structure size, insert the personalized data into the second file, and obtain the installation package after the data is inserted.

7. The method for inserting data into an installation package according to claim 2, characterized in that: The step of inserting the personalized data into the third file according to the third mode to obtain the installation package after the data is inserted includes: Determining whether the third file is legal; If so, fill a preset data block at the end of the third file, fill the personalized data into the preset data block, obtain the filled third file, expand the filled third file to the second threshold file size, and obtain the installation package after the data is inserted.

8. A data insertion device for an installation package, characterized in that: The device comprises: The acquisition module is used to obtain the user's download requirements; An extraction module, used to extract personalized data in the download request; A selection module, used to select an installation type of the installation package according to the installation information in the download requirement; An insertion module is used to insert the personalized data into a corresponding installation package according to the installation type.

9. An electronic device, characterized in that: The device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the method for inserting data into an installation package according to any one of claims 1 to 7.

10. A storage medium, characterized in that: It stores a computer program, which, when executed by a processor, implements the data insertion method for the installation package as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for adding customized information

    CN104199656A

  • Channel customization supporting channel packaging method and device

    CN106843909A

  • Security data processing method and device, and electronic equipment

    CN107301343A

  • Method and device for writing data into installation package and storage medium

    CN111273920A

  • Processing method and device for extended information in installation package file, and electronic equipment

    CN112306553A