WO2022148185A1 - Data packet updating method and apparatus, electronic device, and readable storage medium - Google Patents

Data packet updating method and apparatus, electronic device, and readable storage medium Download PDF

Info

Publication number
WO2022148185A1
WO2022148185A1 PCT/CN2021/134428 CN2021134428W WO2022148185A1 WO 2022148185 A1 WO2022148185 A1 WO 2022148185A1 CN 2021134428 W CN2021134428 W CN 2021134428W WO 2022148185 A1 WO2022148185 A1 WO 2022148185A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
rpm
data package
target
target rpm
Prior art date
Application number
PCT/CN2021/134428
Other languages
French (fr)
Chinese (zh)
Inventor
董世江
Original Assignee
苏州浪潮智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Publication of WO2022148185A1 publication Critical patent/WO2022148185A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Definitions

  • the present application relates to the technical field of operating systems, and in particular, to a data packet update method, a data packet update apparatus, an electronic device, and a computer-readable storage medium.
  • RPM (Redhat Package Manager) data packages are pre-compiled and packaged files on the Linux system.
  • the compilation and generation of RPM data packages depend on source code.
  • An RPM data package can be built by relying on one or more RPM data packages. Therefore, when an RPM data package is updated due to changes in the source code, it depends on the RPM data package. Other RPM packages also need to be rebuilt. For a successfully constructed RPM data package, its source code cannot be rebuilt without modification. Therefore, the related technology needs to modify the source code when the RPM data package is updated, and the source code corresponding to these RPM data packages does not need to be modified. The code is easy to cause errors that did not exist in the original, and also increases the unnecessary workload. Therefore, the related art has the problem that the source code must be modified to be able to update the RPM data package.
  • the purpose of this application is to provide a data packet update method, a data packet update device, an electronic device and a computer-readable storage medium, which can update the RPM data packet without revising the source code, avoiding the need for modification of the source code. errors and unnecessary work.
  • a data package update method including:
  • Re-execute the target RPM task to obtain a target RPM data packet, and replace the original RPM data packet with the target RPM data packet.
  • deleting the data package construction information corresponding to the target RPM task from the database includes:
  • the described acquisition of the compilation sequence number corresponding to the target RPM task includes:
  • the task information is parsed to obtain the compilation serial number.
  • the target RPM task that has been successfully executed is determined according to the task number, including:
  • the initial RPM task is determined to be the target RPM task.
  • the described utilization of the target RPM data package to replace the original RPM data package it also includes:
  • the deletion instruction corresponding to the target RPM data package is detected, the target RPM data package is deleted, and the first data package construction information corresponding to the target RPM data package is deleted from the database.
  • the target RPM data package before deleting the target RPM data package, it also includes:
  • a backup data package corresponding to the target RPM data package is generated, and the backup data package is stored in a backup path.
  • the application also provides a data package update device, including:
  • the acquisition module is used to acquire and parse the recompilation instruction to obtain the task number
  • a task determination module for determining the successfully executed target RPM task according to the task number
  • a deletion module for deleting the data packet construction information corresponding to the target RPM task from the database
  • a data packet generation module is used to re-execute the target RPM task, obtain a target RPM data packet, and replace the original RPM data packet with the target RPM data packet.
  • the application also provides an electronic device, including a memory and a processor, wherein:
  • the memory for storing computer programs
  • the processor is configured to execute the computer program to implement the above-mentioned data packet update method.
  • the present application also provides a computer-readable storage medium for storing a computer program, wherein when the computer program is executed by a processor, the above-mentioned data packet updating method is implemented.
  • the data package update method provided by the present application obtains and parses the recompilation instruction to obtain the task number; determines the successfully executed target RPM task according to the task number; deletes the data package construction information corresponding to the target RPM task from the database; re-executes the target RPM task, get the target RPM data package, and replace the original RPM data package with the target RPM data package.
  • the method can determine the target RPM task when updating the RPM data package, and the target RPM task is the task of generating the target RPM data package.
  • the target RPM task is the task of generating the target RPM data package.
  • delete the corresponding data package construction information in the database The data package construction information is used to record the construction information of the target RPM data package.
  • the build record is deleted, reverting to a state where the target RPM task was not executed.
  • a new target RPM data package can be generated and used to replace the original original RPM package.
  • the method does not need to modify the source code, the target RPM task can be initialized by deleting the data package construction information, and the target RPM task is re-executed after initialization to complete the update of the RPM data package and avoid errors caused by modifying the source code. And unnecessary workload, solves the problem existing in the related art that the source code must be modified to be able to update the RPM data package.
  • the present application also provides a data package update device, an electronic device and a computer-readable storage medium, which also have the above beneficial effects.
  • FIG. 1 is a flowchart of a method for updating a data packet provided by an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of an apparatus for updating data packets according to an embodiment of the present application
  • FIG. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 1 is a flowchart of a method for updating a data packet provided by an embodiment of the present application.
  • the method includes:
  • All or part of this embodiment can be executed by a designated electronic device, and the designated electronic device can be any electronic device that can perform RPM tasks and then generate RPM data packets, for example, can be a computer with a Linux system, the Linux system is a computer with The version of the RPM build system, for example, may be a Fedora version of the Linux system, and the corresponding RPM build system is the koji system.
  • the various steps in this embodiment can be performed through the koji CLI commands employed by the koji system.
  • the recompilation instruction can be obtained and parsed, and the task number used to specify the target task can be obtained, and the specific content of the task number is not limited.
  • This embodiment does not limit the parsing manner of the recompilation instruction, and the specific parsing manner may be different according to the format of the recompilation instruction.
  • This embodiment does not limit the generation method of the recompilation instruction. For example, the user can input the recompilation instruction on the front-end page (such as the kojiwebtask page), and generate the recompilation instruction according to the input content; or the user can operate on the front-end page and generate the recompilation instruction according to the specific operation compilation instructions.
  • this embodiment does not limit the acquisition method of the recompilation instruction.
  • the initial instruction when any instruction is acquired, it is determined as the initial instruction, and the initial task number is obtained by parsing it, and the initial task number is obtained by using the initial task number.
  • the task number determines the corresponding task, and judges whether the status of the task is successfully executed. If the status of the task is successfully executed, it is determined that the initial instruction is a recompile instruction. Or after it is detected that the task status is successfully executed, it is further judged whether the initial instruction has operation selection information, if the initial instruction has operation selection information, or if the initial instruction has operation selection information and it selects the recompile operation, then determine.
  • the initial instruction is a recompile instruction, and the initial task number is determined as the task number.
  • the task number may be represented by task_id.
  • S102 Determine the successfully executed target RPM task according to the task number.
  • the target RPM task After getting the task number, use the task number to determine the target RPM task. It should be noted that, since the constructed RPM data package is to be updated in this embodiment, the corresponding target RPM must be in a successfully executed state, that is, a successfully executed state. This embodiment does not limit the specific manner of determining the target RPM, for example, the target RPM can be obtained by filtering the task list by using the task number.
  • the steps of determining the successfully executed target RPM task according to the task number may include:
  • Step 11 Determine the initial RPM task by using the task number, and obtain initial task information corresponding to the initial RPM task.
  • Step 12 Parse the initial task information to obtain a build field and a status field.
  • Step 13 If the build field is not empty and the status field is successful, the initial RPM task is determined as the target RPM task.
  • the task number is obtained by parsing, it is used to obtain the corresponding initial task information.
  • the instruction of kojitaskinfotask_id can be used to obtain the initial task information, and the initial task information can be parsed to obtain the build field (ie, the build field) and the state field (ie, the state field). field).
  • the build field is empty, it means that the initial RPM task is in the free state (ie 0 state, the corresponding state field is 0), the open state (ie 1 state, the corresponding state field is 1), the assigned state (ie 4 state, corresponding to The state field is 4), cancel state (that is, state 3, the corresponding state field is 3), the task does not build an RPM packet.
  • the initial RPM task is not the target RPM task. If the build field is not empty and the state field is 5 (that is, the 5 state), it means that the initial task is in the execution failure state, and the initial RPM task is not the target RPM task. If the build field is not empty and the state field is 2 (that is, the 2 state), it means that the initial task is in the successful execution state, and the initial RPM task is the target RPM task.
  • the present embodiment does not limit the processing manner of the initial RPM tasks whose states are 0, 1, 3, 4, and 5. For example, no processing may be performed. Or in a feasible implementation manner, for the initial RPM tasks in states 0, 1, and 4, the state can be modified to 3 and re-executed; for the initial RPM tasks in states 3 and 5, it can be directly re-executed.
  • the corresponding RPM data package will be constructed, and the data package construction information corresponding to the RPM data package will be recorded in the database.
  • the data package construction information in the database needs to be deleted, so that no information related to the target RPM task is recorded in the database, thereby ensuring that the target RPM task can be executed again.
  • This embodiment does not limit the specific form of the database, for example, it may be a PostgreSQL database, a relational database.
  • the database may include multiple data tables, some of which, or all of the data tables, may have packet construction information.
  • the RPM data package obtained by the construction has a special number, and the number may be called a compilation sequence number, which may be specifically represented by build_id. Therefore, when deleting the data package construction information, the database can be filtered by the compilation serial number, and the data package construction information can be found and deleted.
  • the step of deleting the data package construction information corresponding to the target RPM task from the database may include:
  • Step 21 Obtain the compilation sequence number corresponding to the target RPM task.
  • Step 22 Screen multiple construction information in the database by using the compilation sequence number to obtain data packet construction information.
  • Step 23 Delete the packet build information.
  • the database may include four data tables, namely buildroot_listing data table, rpmsigs data table, rpminfo data table, and tag_listing data table.
  • the buildroot_listing data table can record information such as the serial number of the RPM data package and the update flag bit
  • the rpmsigs data table is used to record the signature information of the RPM data package
  • the rpminfo data table is used to record the attribute information of the RPM data package, such as the source code path, etc.
  • the tag_listing data table is used to record the grouping information corresponding to the RPM data package.
  • the following psql commands can be used to search and delete the packet construction information in the database:
  • the input parameter is the input compilation sequence number
  • the step of obtaining the compilation sequence number corresponding to the target RPM task may include:
  • Step 31 Obtain task information corresponding to the target RPM task by using the task number.
  • Step 32 Parse the task information to obtain a compilation serial number.
  • the task number in this application can determine the target RPM task that has been successfully executed, the target RPM task that has been successfully executed will inevitably build the corresponding RPM data package, so the corresponding task information must have a compilation sequence number, and this method can be fast and accurate. to obtain the compilation serial number.
  • S104 Re-execute the target RPM task to obtain the target RPM data package, and replace the original RPM data package with the target RPM data package.
  • the target RPM task is re-executed to obtain the corresponding target RPM data package, and the original original RPM data package is replaced by the target RPM data package to complete the update of the RPM data package.
  • the source code corresponding to the target RPM data package and the original RPM data package are the same, and the data package names are also the same. The difference is that the content of the RPM data package they depend on is different. Under the koji build system, you can use kojiresubmittask_id to resubmit the target RPM task, and then re-execute the target RPM task.
  • the original RPM data package can also be backed up, for example, stored in the backup path, so that the backed up original RPM data package can be used for processing when needed. rollback.
  • the steps of re-executing the target RPM task to obtain the target RPM data package may include:
  • Step 41 Compile the target source code corresponding to the target RPM task to obtain the target RPM data package.
  • Step 42 Add the first data package construction information corresponding to the target RPM data package in the database.
  • the corresponding target source code is first determined, and the target source code is used to compile and generate the target RPM data package, and its specific content is not limited. While generating the target RPM data package, it is also necessary to add the corresponding first data package construction information in the database to ensure that the target RPM data package can be used normally.
  • the original RPM data package after replacing the original RPM data package with the target RPM data package, it can also include:
  • the deletion instruction corresponding to the target RPM data package is detected, the target RPM data package is deleted, and the first data package construction information corresponding to the target RPM data package is deleted from the database.
  • the existing RPM data package may also be deleted.
  • the target RPM data package can be deleted, and the corresponding first data package construction information can be deleted at the same time, so as to completely delete all the information corresponding to the target RPM data package.
  • other RPM data packages specified by the deletion instruction can also be deleted by using the above method.
  • a restore operation for restoring the deleted RPM data package.
  • a backup data package corresponding to the target RPM data package may also be generated, and the backup data package may be stored in the backup path.
  • Multiple backup data packages can be stored in the backup path, so that the backup data packages can be used to perform data package recovery operations when needed.
  • the data packet recovery operation may include:
  • Step 51 Acquire and parse the data packet recovery instruction to obtain target data packet information.
  • Step 52 Determine whether there is a target backup data packet corresponding to the target data packet information in the backup path.
  • Step 53 If the target backup data package exists in the backup path, save the target backup data package to the original path.
  • Step 54 Insert the second data package construction information corresponding to the target backup data package into the database.
  • the original path is the normal storage path when the target backup data package is used as the RPM data package.
  • a packet rollback operation can be formed by using the packet delete operation and the packet recovery operation. Specifically, if the original RPM data package is backed up before the target RPM data package is used to replace the original RPM data package, when the data package rollback instruction is received, the target data package and the corresponding first data package are first deleted by the delete operation Build the information, and use the backup corresponding to the original RPM data package to perform the data package recovery operation to complete the rollback of the data package.
  • a target RPM task when updating the RPM data package, a target RPM task can be determined, and the target RPM task is the task of generating the target RPM data package. After determining the target RPM task, delete the corresponding data package construction information in the database. The data package construction information is used to record the construction information of the target RPM data package. By deleting the data package construction information, the target RPM data package can be successfully The build record is deleted, reverting to a state where the target RPM task was not executed. By re-executing the target RPM task, a new target RPM data package can be generated and used to replace the original original RPM package.
  • the method does not need to modify the source code, the target RPM task can be initialized by deleting the data package construction information, and the target RPM task is re-executed after initialization to complete the update of the RPM data package and avoid errors caused by modifying the source code. And unnecessary workload, solves the problem existing in the related art that the source code must be modified to be able to update the RPM data package.
  • the following describes the data packet updating apparatus provided by the embodiments of the present application.
  • the data packet updating apparatus described below and the data packet updating method described above may refer to each other correspondingly.
  • FIG. 2 is a schematic structural diagram of a data packet updating apparatus provided by an embodiment of the present application, including:
  • an acquisition module 110 used for acquiring and parsing the recompilation instruction to obtain the task number
  • the task determination module 120 is used for determining the successfully executed target RPM task according to the task number
  • a deletion module 130 is used to delete the data package construction information corresponding to the target RPM task from the database
  • the data package generation module 140 is configured to re-execute the target RPM task, obtain the target RPM data package, and replace the original RPM data package with the target RPM data package.
  • delete module 130 including:
  • the compilation sequence number obtaining unit is used to obtain the compilation sequence number corresponding to the target RPM task
  • a screening unit used for screening a plurality of construction information in the database by using the compilation sequence number to obtain data packet construction information
  • Remove unit used to remove packet build information.
  • the compilation sequence number acquisition unit includes:
  • the task information acquisition subunit is used to obtain the task information corresponding to the target RPM task by using the task number;
  • the parsing subunit is used to parse the task information to obtain the compilation sequence number.
  • the task determination module 120 includes:
  • a task information acquisition unit used to determine the initial RPM task by using the task number, and obtain the initial task information corresponding to the initial RPM task;
  • the field acquisition unit is used to parse the initial task information to obtain the construction field and the status field;
  • the task determination unit is used to determine the initial RPM task as the target RPM task if the build field is not empty and the status field is successful.
  • the deletion module is configured to delete the target RPM data package if the deletion instruction corresponding to the target RPM data package is detected, and delete the first data package construction information corresponding to the target RPM data package from the database.
  • the backup module is used to generate a backup data package corresponding to the target RPM data package, and store the backup data package in the backup path.
  • the recovery instruction acquisition module is used to acquire and parse the data packet recovery instruction to obtain the target data packet information
  • an existence judgment module used for judging whether there is a target backup data packet corresponding to the target data packet information under the backup path
  • the original path saving module is used to save the target backup data package to the original path if the target backup data package exists in the backup path;
  • the construction information insertion module is used for inserting the second data packet construction information corresponding to the target backup data packet in the database.
  • the electronic device provided by the embodiments of the present application will be introduced below, and the electronic device described below and the data packet update method described above may refer to each other correspondingly.
  • the electronic device 100 may include a processor 101 and a memory 102 , and may further include one or more of a multimedia component 103 , an information input/information output (I/O) interface 104 and a communication component 105 .
  • a multimedia component 103 may be included in the electronic device 100 .
  • I/O information input/information output
  • the processor 101 is used to control the overall operation of the electronic device 100 to complete all or part of the steps in the above-mentioned data packet update method;
  • the memory 102 is used to store various types of data to support the operation of the electronic device 100, these Data may include, for example, instructions for any application or method to operate on the electronic device 100, as well as application-related data.
  • the memory 102 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory) Erasable Programmable Read-Only Memory, EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (Read- One or more of Only Memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk.
  • SRAM Static Random Access Memory
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • EPROM Erasable Programmable Read-Only Memory
  • PROM Programmable Read-Only Memory
  • Read- One or more of Only Memory ROM
  • magnetic memory flash memory
  • flash memory magnetic disk or optical disk.
  • Multimedia components 103 may include screen and audio components.
  • the screen can be, for example, a touch screen, and the audio component is used for outputting and/or inputting audio signals.
  • the audio component may include a microphone for receiving external audio signals.
  • the received audio signal may be further stored in the memory 102 or transmitted through the communication component 105 .
  • the audio assembly also includes at least one speaker for outputting audio signals.
  • the I/O interface 104 provides an interface between the processor 101 and other interface modules, and the above-mentioned other interface modules may be a keyboard, a mouse, a button, and the like. These buttons can be virtual buttons or physical buttons.
  • the communication component 105 is used for wired or wireless communication between the electronic device 100 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC for short), 2G, 3G or 4G, or one or a combination of them, so the corresponding communication component 105 may include: Wi-Fi parts, Bluetooth parts, NFC parts.
  • the electronic device 100 may be implemented by one or more Application Specific Integrated Circuit (ASIC for short), Digital Signal Processor (DSP for short), Digital Signal Processing Device (DSPD for short), Programmable Logic Device (PLD for short), Field Programmable Gate Array (FPGA for short), controller, microcontroller, microprocessor or other electronic components are implemented for implementing the above embodiments The given packet update method.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Signal Processor
  • DSPD Digital Signal Processing Device
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • the computer-readable storage medium provided by the embodiments of the present application is introduced below, and the computer-readable storage medium described below and the data packet update method described above may refer to each other correspondingly.
  • the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned data packet updating method are implemented.
  • the computer-readable storage medium may include: U disk, removable hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc. that can store program codes medium.
  • the steps of a method or algorithm described in connection with the embodiments disclosed herein may be directly implemented in hardware, a software module executed by a processor, or a combination of the two.
  • the software module can be placed in random access memory (RAM), internal memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.

Abstract

A data packet updating method and apparatus, an electronic device, and a computer-readable storage medium. The method comprises: acquiring and parsing a re-compiling instruction to obtain a task number (S101); determining, according to the task number, a target RPM task that has been successfully executed (S102); deleting, from a database, data packet construction information corresponding to the target RPM task (S103); and re-executing the target RPM task to obtain a target RPM data packet, and replacing an original RPM data packet with the target RPM data packet (S104). According to the method, there is no need to modify source code, a target RPM task can be initialized by deleting data packet construction information, and the target RPM task is re-executed after the initialization, so as to complete updating of an RPM data packet, thereby avoiding errors and unnecessary workload caused by modifying source code.

Description

一种数据包更新方法、装置、电子设备及可读存储介质A data package update method, apparatus, electronic device and readable storage medium
本申请要求在2021年1月7日提交中国专利局、申请号为202110018516.9、发明名称为“一种数据包更新方法、装置、电子设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on January 7, 2021, with the application number of 202110018516.9 and the invention titled "A data packet update method, device, electronic device and readable storage medium", which The entire contents of this application are incorporated by reference.
技术领域technical field
本申请涉及操作系统技术领域,特别涉及一种数据包更新方法、数据包更新装置、电子设备及计算机可读存储介质。The present application relates to the technical field of operating systems, and in particular, to a data packet update method, a data packet update apparatus, an electronic device, and a computer-readable storage medium.
背景技术Background technique
RPM(Redhat Package Manager)数据包是预先在linux系统上编译好并打包好的文件。RPM数据包的编译生成依赖于源代码,一个RPM数据包可以依赖另外一个或多个RPM数据包构建,因此当某一RPM数据包因源代码发生改变而更新后,依赖于该RPM数据包的其他RPM数据包同样需要重新构建。而对于构建成功的RPM数据包,其源代码没有发生修改就无法重新构建,因此相关技术在RPM数据包更新时需要修改源代码,而这些RPM数据包对应的源代码并不需要修改,修改源代码容易造成原本不存在错误,也增加了不必要的工作量。因此相关技术存在必须修改源代码才能够更新RPM数据包的问题。RPM (Redhat Package Manager) data packages are pre-compiled and packaged files on the Linux system. The compilation and generation of RPM data packages depend on source code. An RPM data package can be built by relying on one or more RPM data packages. Therefore, when an RPM data package is updated due to changes in the source code, it depends on the RPM data package. Other RPM packages also need to be rebuilt. For a successfully constructed RPM data package, its source code cannot be rebuilt without modification. Therefore, the related technology needs to modify the source code when the RPM data package is updated, and the source code corresponding to these RPM data packages does not need to be modified. The code is easy to cause errors that did not exist in the original, and also increases the unnecessary workload. Therefore, the related art has the problem that the source code must be modified to be able to update the RPM data package.
因此,相关技术存在的必须修改源代码才能够更新RPM数据包的问题,是本领域技术人员需要解决的技术问题。Therefore, the problem existing in the related art that the RPM data package can be updated only by modifying the source code is a technical problem to be solved by those skilled in the art.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本申请的目的在于提供一种数据包更新方法、数据包更新装置、电子设备及计算机可读存储介质,不需要修改源代码即可更新RPM数据包,避免了因修改源代码而出现的错误和不必要的工作量。In view of this, the purpose of this application is to provide a data packet update method, a data packet update device, an electronic device and a computer-readable storage medium, which can update the RPM data packet without revising the source code, avoiding the need for modification of the source code. errors and unnecessary work.
为解决上述技术问题,本申请提供了一种数据包更新方法,包括:In order to solve the above-mentioned technical problems, the present application provides a data package update method, including:
获取并解析重新编译指令,得到任务编号;Get and parse the recompile instruction to get the task number;
根据所述任务编号确定已成功执行的目标RPM任务;Determine the successfully executed target RPM task according to the task number;
从数据库中删除所述目标RPM任务对应的数据包构建信息;Delete the data package construction information corresponding to the target RPM task from the database;
重新执行所述目标RPM任务,得到目标RPM数据包,并利用所述目标RPM数据包替换原始RPM数据包。Re-execute the target RPM task to obtain a target RPM data packet, and replace the original RPM data packet with the target RPM data packet.
可选地,所述从数据库中删除所述目标RPM任务对应的数据包构建信息,包括:Optionally, deleting the data package construction information corresponding to the target RPM task from the database includes:
获取所述目标RPM任务对应的编译序号;Obtain the compilation sequence number corresponding to the target RPM task;
利用所述编译序号筛选所述数据库中的多个构建信息,得到所述数据包构建信息;Use the compilation sequence number to screen a plurality of construction information in the database to obtain the data packet construction information;
删除所述数据包构建信息。Delete the packet build information.
可选地,所述获取所述目标RPM任务对应的编译序号,包括:Optionally, the described acquisition of the compilation sequence number corresponding to the target RPM task includes:
利用所述任务编号获取所述目标RPM任务对应的任务信息;Utilize the task number to obtain the task information corresponding to the target RPM task;
对所述任务信息进行解析,得到所述编译序号。The task information is parsed to obtain the compilation serial number.
可选地,所述根据所述任务编号确定已成功执行的目标RPM任务,包括:Optionally, the target RPM task that has been successfully executed is determined according to the task number, including:
利用所述任务编号确定初始RPM任务,并获取所述初始RPM任务对应的初始任务信息;Utilize described task number to determine initial RPM task, and obtain the initial task information corresponding to described initial RPM task;
对所述初始任务信息进行解析,得到构建字段和状态字段;Analyze the initial task information to obtain a build field and a status field;
若所述构建字段不为空,且所述状态字段为成功,则将所述初始RPM任务确定为所述目标RPM任务。If the build field is not empty and the status field is successful, the initial RPM task is determined to be the target RPM task.
可选地,在所述利用所述目标RPM数据包替换原始RPM数据包之后,还包括:Optionally, after the described utilization of the target RPM data package to replace the original RPM data package, it also includes:
若检测到所述目标RPM数据包对应的删除指令,则删除所述目标RPM数据包,并从所述数据库中删除所述目标RPM数据包对应的第一数据包构建信息。If the deletion instruction corresponding to the target RPM data package is detected, the target RPM data package is deleted, and the first data package construction information corresponding to the target RPM data package is deleted from the database.
可选地,在删除所述目标RPM数据包之前,还包括:Optionally, before deleting the target RPM data package, it also includes:
生成所述目标RPM数据包对应的备份数据包,并将所述备份数据包存储于备份路径。A backup data package corresponding to the target RPM data package is generated, and the backup data package is stored in a backup path.
可选地,还包括:Optionally, also include:
获取并解析数据包恢复指令,得到目标数据包信息;Obtain and parse the data packet recovery instruction to obtain the target data packet information;
判断所述备份路径下是否存在与所述目标数据包信息对应的目标备份数据包;Judging whether there is a target backup data packet corresponding to the target data packet information under the backup path;
若所述备份路径下存在所述目标备份数据包,将所述目标备份数据包保存至原始路径;If the target backup data package exists in the backup path, save the target backup data package to the original path;
在所述数据库中插入所述目标备份数据包对应的第二数据包构建信息。Insert the second data package construction information corresponding to the target backup data package into the database.
本申请还提供了一种数据包更新装置,包括:The application also provides a data package update device, including:
获取模块,用于获取并解析重新编译指令,得到任务编号;The acquisition module is used to acquire and parse the recompilation instruction to obtain the task number;
任务确定模块,用于根据所述任务编号确定已成功执行的目标RPM任务;A task determination module for determining the successfully executed target RPM task according to the task number;
删除模块,用于从数据库中删除所述目标RPM任务对应的数据包构建信息;A deletion module for deleting the data packet construction information corresponding to the target RPM task from the database;
数据包生成模块,用于重新执行所述目标RPM任务,得到目标RPM数据包,并利用所述目标RPM数据包替换原始RPM数据包。A data packet generation module is used to re-execute the target RPM task, obtain a target RPM data packet, and replace the original RPM data packet with the target RPM data packet.
本申请还提供了一种电子设备,包括存储器和处理器,其中:The application also provides an electronic device, including a memory and a processor, wherein:
所述存储器,用于保存计算机程序;the memory for storing computer programs;
所述处理器,用于执行所述计算机程序,以实现上述的数据包更新方法。The processor is configured to execute the computer program to implement the above-mentioned data packet update method.
本申请还提供了一种计算机可读存储介质,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现上述的数据包更新方法。The present application also provides a computer-readable storage medium for storing a computer program, wherein when the computer program is executed by a processor, the above-mentioned data packet updating method is implemented.
本申请提供的数据包更新方法,获取并解析重新编译指令,得到任务编号;根据任务编号确定已成功执行的目标RPM任务;从数据库中删除目标RPM任务对应的数据包构建信息;重新执行目标RPM任务,得到目标RPM数据包,并利用目标RPM数据包替换原始RPM数据包。The data package update method provided by the present application obtains and parses the recompilation instruction to obtain the task number; determines the successfully executed target RPM task according to the task number; deletes the data package construction information corresponding to the target RPM task from the database; re-executes the target RPM task, get the target RPM data package, and replace the original RPM data package with the target RPM data package.
可见,该方法在对RPM数据包进行更新时,可以确定目标RPM任务,目标RPM任务即为生成目标RPM数据包的任务。在确定目标RPM任务后,将数据库中其对应的数据包构建信息删除,数据包构建信息用于记录目标RPM数据包的构建信息,通过删除数据包构建信息,即可将目标RPM数据包被成功构建的记录删除,恢复到目标RPM任务没有被执行的状态。通过重新执行目标RPM任务,即可生成新的目标RPM数据包,并利用其对原有的原始RPM包进行替换。该方法不需要修改源代码,通过删除数据包构建信息即可将目标RPM任务初始化,并在初始化后重新执行目标RPM任务,完成 对RPM数据包的更新,避免了因修改源代码而出现的错误和不必要的工作量,解决了相关技术存在的必须修改源代码才能够更新RPM数据包的问题。It can be seen that the method can determine the target RPM task when updating the RPM data package, and the target RPM task is the task of generating the target RPM data package. After determining the target RPM task, delete the corresponding data package construction information in the database. The data package construction information is used to record the construction information of the target RPM data package. By deleting the data package construction information, the target RPM data package can be successfully The build record is deleted, reverting to a state where the target RPM task was not executed. By re-executing the target RPM task, a new target RPM data package can be generated and used to replace the original original RPM package. The method does not need to modify the source code, the target RPM task can be initialized by deleting the data package construction information, and the target RPM task is re-executed after initialization to complete the update of the RPM data package and avoid errors caused by modifying the source code. And unnecessary workload, solves the problem existing in the related art that the source code must be modified to be able to update the RPM data package.
此外,本申请还提供了一种数据包更新装置、电子设备及计算机可读存储介质,同样具有上述有益效果。In addition, the present application also provides a data package update device, an electronic device and a computer-readable storage medium, which also have the above beneficial effects.
附图说明Description of drawings
为了更清楚地说明本申请实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application or related technologies more clearly, the following briefly introduces the accompanying drawings that are used in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only the For the embodiments of the application, for those of ordinary skill in the art, other drawings can also be obtained according to the provided drawings without any creative effort.
图1为本申请实施例提供的一种数据包更新方法流程图;1 is a flowchart of a method for updating a data packet provided by an embodiment of the present application;
图2为本申请实施例提供的一种数据包更新装置的结构示意图;FIG. 2 is a schematic structural diagram of an apparatus for updating data packets according to an embodiment of the present application;
图3为本申请实施例提供的一种电子设备的结构示意图。FIG. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments It is only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
请参考图1,图1为本申请实施例提供的一种数据包更新方法流程图。该方法包括:Please refer to FIG. 1 , which is a flowchart of a method for updating a data packet provided by an embodiment of the present application. The method includes:
S101:获取并解析重新编译指令,得到任务编号。S101: Obtain and parse the recompilation instruction to obtain the task number.
本实施例中的全部或部分可以由指定的电子设备执行,该指定的电子设备可以为任意可以执行RPM任务进而生成RPM数据包的电子设备,例如可以为Linux系统的计算机,该Linux系统为具有RPM构建系统的版本,例如可以为Fedora版本的Linux系统,其对应的RPM构建系统为koji系统。在这 种情况下,本实施例中的各个步骤可以通过koji系统采用的koji CLI命令执行。All or part of this embodiment can be executed by a designated electronic device, and the designated electronic device can be any electronic device that can perform RPM tasks and then generate RPM data packets, for example, can be a computer with a Linux system, the Linux system is a computer with The version of the RPM build system, for example, may be a Fedora version of the Linux system, and the corresponding RPM build system is the koji system. In this case, the various steps in this embodiment can be performed through the koji CLI commands employed by the koji system.
在需要对已经构建好的数据包进行更新时,可以获取并解析重新编译指令,得到用于指定目标任务的任务编号,任务编号的具体内容不做限定。本实施例并不限定重新编译指令的解析方式,根据重新编译指令格式的不同,具体解析方式可以不同。本实施例并不限定重新编译指令的生成方式,例如可以由用户在前端页面(例如kojiwebtask页面)输入,根据输入的内容生成重新编译指令;或者由用户在前端页面操作,根据具体的操作生成重新编译指令。进一步的,本实施例并不限定重新编译指令的获取方式,例如在一种可行的实施方式中,在获取到任何指令时均将其确定为初始指令,并从中解析得到初始任务编号,利用初始任务编号确定对应的任务,并判断任务的状态是否为已成功执行。若任务的状态为已成功执行,则确定该初始指令为重新编译指令。或者在检测到任务状态为已成功执行后,进一步判断初始指令中是否具有操作选择信息,若初始指令中具有操作选择信息,或者若初始指令中具有操作选择信息且其选择重新编译操作,则确定初始指令为重新编译指令,并将初始任务编号确定为任务编号。在本实施例中,任务编号可以用task_id表示。When the constructed data package needs to be updated, the recompilation instruction can be obtained and parsed, and the task number used to specify the target task can be obtained, and the specific content of the task number is not limited. This embodiment does not limit the parsing manner of the recompilation instruction, and the specific parsing manner may be different according to the format of the recompilation instruction. This embodiment does not limit the generation method of the recompilation instruction. For example, the user can input the recompilation instruction on the front-end page (such as the kojiwebtask page), and generate the recompilation instruction according to the input content; or the user can operate on the front-end page and generate the recompilation instruction according to the specific operation compilation instructions. Further, this embodiment does not limit the acquisition method of the recompilation instruction. For example, in a feasible implementation manner, when any instruction is acquired, it is determined as the initial instruction, and the initial task number is obtained by parsing it, and the initial task number is obtained by using the initial task number. The task number determines the corresponding task, and judges whether the status of the task is successfully executed. If the status of the task is successfully executed, it is determined that the initial instruction is a recompile instruction. Or after it is detected that the task status is successfully executed, it is further judged whether the initial instruction has operation selection information, if the initial instruction has operation selection information, or if the initial instruction has operation selection information and it selects the recompile operation, then determine. The initial instruction is a recompile instruction, and the initial task number is determined as the task number. In this embodiment, the task number may be represented by task_id.
S102:根据任务编号确定已成功执行的目标RPM任务。S102: Determine the successfully executed target RPM task according to the task number.
在得到任务编号后,利用任务编号确定目标RPM任务。需要说明的是,由于本实施例中想要对已构建的RPM数据包进行更新,因此其对应的目标RPM必然处于已成功执行的状态,即已经成功执行完毕的状态。本实施例并不限定确定目标RPM的具体方式,例如可以利用任务编号筛选任务列表,得到目标RPM。After getting the task number, use the task number to determine the target RPM task. It should be noted that, since the constructed RPM data package is to be updated in this embodiment, the corresponding target RPM must be in a successfully executed state, that is, a successfully executed state. This embodiment does not limit the specific manner of determining the target RPM, for example, the target RPM can be obtained by filtering the task list by using the task number.
具体的,在一种实施方式中,为了防止重新编译指令中的任务编号输入错误,使得后续步骤成为无效步骤,造成计算资源的浪费,可以在确定目标RPM任务后判断其状态是否为已成功执行状态。即根据任务编号确定已成功执行的目标RPM任务的步骤可以包括:Specifically, in one embodiment, in order to prevent the wrong input of the task number in the recompilation instruction, making the subsequent steps become invalid steps and causing waste of computing resources, it is possible to determine whether the status of the target RPM task is successfully executed after determining the target RPM task. state. That is, the steps of determining the successfully executed target RPM task according to the task number may include:
步骤11:利用任务编号确定初始RPM任务,并获取初始RPM任务对应的初始任务信息。Step 11: Determine the initial RPM task by using the task number, and obtain initial task information corresponding to the initial RPM task.
步骤12:对初始任务信息进行解析,得到构建字段和状态字段。Step 12: Parse the initial task information to obtain a build field and a status field.
步骤13:若构建字段不为空,且状态字段为成功,则将初始RPM任务确定为目标RPM任务。Step 13: If the build field is not empty and the status field is successful, the initial RPM task is determined as the target RPM task.
具体的,在解析得到任务编号后,利用其获取对应的初始任务信息,例如可以采用kojitaskinfotask_id的指令获取初始任务信息,并解析初始任务信息,得到构建字段(即build字段)和状态字段(即state字段)。若build字段为空,则说明初始RPM任务处于free状态(即0状态,对应的state字段为0)、open状态(即1状态,对应的state字段为1)、assigned状态(即4状态,对应的state字段为4)、cancel状态(即3状态,对应的state字段为3),该任务并没有构建RPM数据包。在这种情况下,初始RPM任务不是目标RPM任务。若build字段不为空,且state字段为5(即5状态),即为失败,则说明该初始任务为执行失败状态,则初始RPM任务不是目标RPM任务。若build字段不为空,且state字段为2(即2状态),即为成功,则说明该初始任务为成功执行状态,则初始RPM任务即为目标RPM任务。Specifically, after the task number is obtained by parsing, it is used to obtain the corresponding initial task information. For example, the instruction of kojitaskinfotask_id can be used to obtain the initial task information, and the initial task information can be parsed to obtain the build field (ie, the build field) and the state field (ie, the state field). field). If the build field is empty, it means that the initial RPM task is in the free state (ie 0 state, the corresponding state field is 0), the open state (ie 1 state, the corresponding state field is 1), the assigned state (ie 4 state, corresponding to The state field is 4), cancel state (that is, state 3, the corresponding state field is 3), the task does not build an RPM packet. In this case, the initial RPM task is not the target RPM task. If the build field is not empty and the state field is 5 (that is, the 5 state), it means that the initial task is in the execution failure state, and the initial RPM task is not the target RPM task. If the build field is not empty and the state field is 2 (that is, the 2 state), it means that the initial task is in the successful execution state, and the initial RPM task is the target RPM task.
可以理解的是,本实施例并不限定对状态为0、1、3、4、5的初始RPM任务的处理方式,例如可以为不执行任何处理。或者在一种可行的实施方式中,对于0、1、4状态的初始RPM任务,可以将其状态修改为3,并重新执行;对于3、5状态的初始RPM任务,可以直接重新执行。It can be understood that, the present embodiment does not limit the processing manner of the initial RPM tasks whose states are 0, 1, 3, 4, and 5. For example, no processing may be performed. Or in a feasible implementation manner, for the initial RPM tasks in states 0, 1, and 4, the state can be modified to 3 and re-executed; for the initial RPM tasks in states 3 and 5, it can be directly re-executed.
S103:从数据库中删除目标RPM任务对应的数据包构建信息。S103: Delete the data package construction information corresponding to the target RPM task from the database.
目标RPM任务在执行过程中,会构建对应的RPM数据包,同时在数据库中记录该RPM数据包对应的数据包构建信息。为了对目标RPM任务进行初始化,需要将数据库中的数据包构建信息删除,使得数据库中不记录任何与目标RPM任务有关的信息,进而保证目标RPM任务能够再次执行。本实施例并不限定数据库的具体形式,例如可以为PostgreSQL数据库,一种关系型数据库。数据库中可能包括多个数据表,其中部分数据表,或者全部数据表可以具有数据包构建信息。During the execution of the target RPM task, the corresponding RPM data package will be constructed, and the data package construction information corresponding to the RPM data package will be recorded in the database. In order to initialize the target RPM task, the data package construction information in the database needs to be deleted, so that no information related to the target RPM task is recorded in the database, thereby ensuring that the target RPM task can be executed again. This embodiment does not limit the specific form of the database, for example, it may be a PostgreSQL database, a relational database. The database may include multiple data tables, some of which, or all of the data tables, may have packet construction information.
具体的,由于目标RPM任务用于构建RPM数据包,其构建得到的RPM数据包具有特殊的编号,该编号可以被称为编译序号,具体可以用build_id表示。因此在删除数据包构建信息时,可以利用编译序号对数据库进行筛选,查找到数据包构建信息并将其删除。具体的,从数据库中删除目标RPM任务对应的数据包构建信息的步骤可以包括:Specifically, since the target RPM task is used to build an RPM data package, the RPM data package obtained by the construction has a special number, and the number may be called a compilation sequence number, which may be specifically represented by build_id. Therefore, when deleting the data package construction information, the database can be filtered by the compilation serial number, and the data package construction information can be found and deleted. Specifically, the step of deleting the data package construction information corresponding to the target RPM task from the database may include:
步骤21:获取目标RPM任务对应的编译序号。Step 21: Obtain the compilation sequence number corresponding to the target RPM task.
步骤22:利用编译序号筛选数据库中的多个构建信息,得到数据包构建信息。Step 22: Screen multiple construction information in the database by using the compilation sequence number to obtain data packet construction information.
步骤23:删除数据包构建信息。Step 23: Delete the packet build information.
当数据库为PostgreSQL数据库时,可以利用psql命令对数据库中的构建信息进行查找和删除。在一种具体的实施方式中,数据库中可以包括四个数据表,分别为buildroot_listing数据表、rpmsigs数据表、rpminfo数据表、tag_listing数据表。其中,buildroot_listing数据表可以记录RPM数据包的序号以及更新标志位等信息,rpmsigs数据表用于记录RPM数据包的签名信息,rpminfo数据表用于记录RPM数据包的属性信息,例如源代码路径等,tag_listing数据表用于记录RPM数据包所对应的分组信息。通过如下psql命令可以对数据库中的数据包构建信息进行查找和删除:When the database is a PostgreSQL database, you can use the psql command to search and delete the build information in the database. In a specific implementation manner, the database may include four data tables, namely buildroot_listing data table, rpmsigs data table, rpminfo data table, and tag_listing data table. Among them, the buildroot_listing data table can record information such as the serial number of the RPM data package and the update flag bit, the rpmsigs data table is used to record the signature information of the RPM data package, and the rpminfo data table is used to record the attribute information of the RPM data package, such as the source code path, etc. , the tag_listing data table is used to record the grouping information corresponding to the RPM data package. The following psql commands can be used to search and delete the packet construction information in the database:
Deletefrombuildroot_listing where rpm_id in(select id from rpminfo where build_id=输入参数);Deletefrombuildroot_listing where rpm_id in(select id from rpminfo where build_id=input parameter);
Deletefromrpmsigs where rpm_id in(select id from rpminfo where build_id=输入参数);Deletefromrpmsigs where rpm_id in(select id from rpminfo where build_id=input parameter);
Deletefromrpminfo where id in(select id from rpminfo where build_id=输入参数);Deletefromrpminfo where id in(select id from rpminfo where build_id=input parameter);
Deletefromtag_listing where wherebuild_id=输入参数;Deletefromtag_listing where wherebuild_id=input parameter;
其中,输入参数即为输入的编译序号,“build_id=输入参数”用于将编译序号赋值给build_id字段,以便将build_id字段的内容为编译序号的构建信息确定为数据包构建信息,并将其删除。Among them, the input parameter is the input compilation sequence number, and "build_id=input parameter" is used to assign the compilation sequence number to the build_id field, so that the build information whose content in the build_id field is the compilation sequence number is determined as the data package construction information and deleted. .
进一步,获取目标RPM任务对应的编译序号的步骤可以包括:Further, the step of obtaining the compilation sequence number corresponding to the target RPM task may include:
步骤31:利用任务编号获取目标RPM任务对应的任务信息。Step 31: Obtain task information corresponding to the target RPM task by using the task number.
步骤32:对任务信息进行解析,得到编译序号。Step 32: Parse the task information to obtain a compilation serial number.
由于本申请中的任务编号可以确定已成功执行的目标RPM任务,而已成功执行的目标RPM任务必然会构建对应的RPM数据包,因此其对应的任务信息中必然存在编译序号,该方式可以快速准确地获取编译序号。Since the task number in this application can determine the target RPM task that has been successfully executed, the target RPM task that has been successfully executed will inevitably build the corresponding RPM data package, so the corresponding task information must have a compilation sequence number, and this method can be fast and accurate. to obtain the compilation serial number.
S104:重新执行目标RPM任务,得到目标RPM数据包,并利用目标RPM数据包替换原始RPM数据包。S104: Re-execute the target RPM task to obtain the target RPM data package, and replace the original RPM data package with the target RPM data package.
在删除数据包构建信息后,重新执行目标RPM任务,得到对应的目标RPM数据包,并利用其替换原有的原始RPM数据包,完成对RPM数据包的更新。需要说明的是,目标RPM数据包和原始RPM数据包对应的源代码相同,数据包名称也相同,区别在于二者依赖的RPM数据包的内容不同。在koji构建系统下,可以利用kojiresubmittask_id重新提交目标RPM任务,进而重新执行目标RPM任务。需要说明的是,在利用目标RPM数据包体院原始RPM数据包之前,还可以对原始RPM数据包进行备份,例如将其存储于备份路径下,以便在需要时利用备份的原始RPM数据包进行回滚。After the data package construction information is deleted, the target RPM task is re-executed to obtain the corresponding target RPM data package, and the original original RPM data package is replaced by the target RPM data package to complete the update of the RPM data package. It should be noted that the source code corresponding to the target RPM data package and the original RPM data package are the same, and the data package names are also the same. The difference is that the content of the RPM data package they depend on is different. Under the koji build system, you can use kojiresubmittask_id to resubmit the target RPM task, and then re-execute the target RPM task. It should be noted that, before using the target RPM data package to construct the original RPM data package, the original RPM data package can also be backed up, for example, stored in the backup path, so that the backed up original RPM data package can be used for processing when needed. rollback.
具体的,重新执行目标RPM任务,得到目标RPM数据包的步骤可以包括:Specifically, the steps of re-executing the target RPM task to obtain the target RPM data package may include:
步骤41:对目标RPM任务对应的目标源代码进行编译,得到目标RPM数据包。Step 41: Compile the target source code corresponding to the target RPM task to obtain the target RPM data package.
步骤42:在数据库中增加目标RPM数据包对应的第一数据包构建信息。Step 42: Add the first data package construction information corresponding to the target RPM data package in the database.
具体的,在执行目标RPM任务时,先确定其对应的目标源代码,目标源代码用于编译生成目标RPM数据包,其具体内容不做限定。在生成目标RPM数据包的同时,还需要在数据库中增加其对应的第一数据包构建信息,保证目标RPM数据包能够正常使用。Specifically, when the target RPM task is executed, the corresponding target source code is first determined, and the target source code is used to compile and generate the target RPM data package, and its specific content is not limited. While generating the target RPM data package, it is also necessary to add the corresponding first data package construction information in the database to ensure that the target RPM data package can be used normally.
在一种具体的实施方式中,在利用目标RPM数据包替换原始RPM数据包之后,还可以包括:In a specific embodiment, after replacing the original RPM data package with the target RPM data package, it can also include:
若检测到目标RPM数据包对应的删除指令,则删除目标RPM数据包,并从数据库中删除目标RPM数据包对应的第一数据包构建信息。If the deletion instruction corresponding to the target RPM data package is detected, the target RPM data package is deleted, and the first data package construction information corresponding to the target RPM data package is deleted from the database.
本申请中,还可以对已有的RPM数据包进行删除。例如在本实施例中,可以将目标RPM数据包进行删除,同时删除其对应的第一数据包构建信息,以便完全删除目标RPM数据包对应的全部信息。需要说明的是,同样可以利用上述方法对删除指令指定的其他RPM数据包进行删除。In this application, the existing RPM data package may also be deleted. For example, in this embodiment, the target RPM data package can be deleted, and the corresponding first data package construction information can be deleted at the same time, so as to completely delete all the information corresponding to the target RPM data package. It should be noted that other RPM data packages specified by the deletion instruction can also be deleted by using the above method.
进一步的,与删除操作对应的,还可以存在恢复操作,用于将被删除的RPM数据包进行恢复。例如,在删除目标RPM数据包之前,还可以生成目标RPM数据包对应的备份数据包,并将备份数据包存储于备份路径。在备份路径下可以存储有多个备份数据包,以便在需要时利用备份数据包进行数据包恢复操作。Further, corresponding to the delete operation, there may also be a restore operation for restoring the deleted RPM data package. For example, before deleting the target RPM data package, a backup data package corresponding to the target RPM data package may also be generated, and the backup data package may be stored in the backup path. Multiple backup data packages can be stored in the backup path, so that the backup data packages can be used to perform data package recovery operations when needed.
其中,数据包恢复操作可以包括:Among them, the data packet recovery operation may include:
步骤51:获取并解析数据包恢复指令,得到目标数据包信息。Step 51: Acquire and parse the data packet recovery instruction to obtain target data packet information.
步骤52:判断备份路径下是否存在与目标数据包信息对应的目标备份数据包。Step 52: Determine whether there is a target backup data packet corresponding to the target data packet information in the backup path.
步骤53:若备份路径下存在目标备份数据包,将目标备份数据包保存至原始路径。Step 53: If the target backup data package exists in the backup path, save the target backup data package to the original path.
步骤54:在数据库中插入目标备份数据包对应的第二数据包构建信息。Step 54: Insert the second data package construction information corresponding to the target backup data package into the database.
需要说明的是,原始路径即为目标备份数据包作为RPM数据包时的正常存储路径。在获取目标数据包信息时,可以先判断是否存在想要恢复的目标备份数据包,若存在想要恢复的目标备份数据包,则可以执行保存至原始路径和在数据库中插入第二数据包构建信息的步骤。具体的,可以对目标备份数据包进行解析,得到第二数据包构建信息,并将其插入至数据库中。It should be noted that the original path is the normal storage path when the target backup data package is used as the RPM data package. When acquiring the target data package information, you can first determine whether there is a target backup data package that you want to restore. If there is a target backup data package you want to restore, you can execute saving to the original path and inserting a second data package into the database to construct information steps. Specifically, the target backup data packet can be parsed to obtain the second data packet construction information, and inserted into the database.
利用数据包删除操作和数据包恢复操作,可以构成数据包回滚操作。具体的,若在利用目标RPM数据包替换原始RPM数据包前对原始RPM数据包进行了备份,在接收到数据包回滚指令时,先利用删除操作删除目标数据包以及对应的第一数据包构建信息,并利用原始RPM数据包对应的备份进行数据包恢复操作,完成数据包的回滚。A packet rollback operation can be formed by using the packet delete operation and the packet recovery operation. Specifically, if the original RPM data package is backed up before the target RPM data package is used to replace the original RPM data package, when the data package rollback instruction is received, the target data package and the corresponding first data package are first deleted by the delete operation Build the information, and use the backup corresponding to the original RPM data package to perform the data package recovery operation to complete the rollback of the data package.
应用本申请实施例提供的数据包更新方法,在对RPM数据包进行更新时,可以确定目标RPM任务,目标RPM任务即为生成目标RPM数据包的任务。在确定目标RPM任务后,将数据库中其对应的数据包构建信息删除,数据包构建信息用于记录目标RPM数据包的构建信息,通过删除数据包构建信息,即可将目标RPM数据包被成功构建的记录删除,恢复到目标RPM任务没有被执行的状态。通过重新执行目标RPM任务,即可生成新的目标RPM数据包,并利用其对原有的原始RPM包进行替换。该方法不需要修改源代码,通过删除数据包构建信息即可将目标RPM任务初始化,并在初始化后重新执行目标RPM任务,完成对RPM数据包的更新,避免了因修改源代码而出现的错误和不必要的工作量,解决了相关技术存在的必须修改源代码才能够更新RPM数据包的问题。By applying the data package update method provided by the embodiment of the present application, when updating the RPM data package, a target RPM task can be determined, and the target RPM task is the task of generating the target RPM data package. After determining the target RPM task, delete the corresponding data package construction information in the database. The data package construction information is used to record the construction information of the target RPM data package. By deleting the data package construction information, the target RPM data package can be successfully The build record is deleted, reverting to a state where the target RPM task was not executed. By re-executing the target RPM task, a new target RPM data package can be generated and used to replace the original original RPM package. The method does not need to modify the source code, the target RPM task can be initialized by deleting the data package construction information, and the target RPM task is re-executed after initialization to complete the update of the RPM data package and avoid errors caused by modifying the source code. And unnecessary workload, solves the problem existing in the related art that the source code must be modified to be able to update the RPM data package.
下面对本申请实施例提供的数据包更新装置进行介绍,下文描述的数据包更新装置与上文描述的数据包更新方法可相互对应参照。The following describes the data packet updating apparatus provided by the embodiments of the present application. The data packet updating apparatus described below and the data packet updating method described above may refer to each other correspondingly.
请参考图2,图2为本申请实施例提供的一种数据包更新装置的结构示意图,包括:Please refer to FIG. 2. FIG. 2 is a schematic structural diagram of a data packet updating apparatus provided by an embodiment of the present application, including:
获取模块110,用于获取并解析重新编译指令,得到任务编号;an acquisition module 110, used for acquiring and parsing the recompilation instruction to obtain the task number;
任务确定模块120,用于根据任务编号确定已成功执行的目标RPM任务;The task determination module 120 is used for determining the successfully executed target RPM task according to the task number;
删除模块130,用于从数据库中删除目标RPM任务对应的数据包构建信息;A deletion module 130 is used to delete the data package construction information corresponding to the target RPM task from the database;
数据包生成模块140,用于重新执行目标RPM任务,得到目标RPM数据包,并利用目标RPM数据包替换原始RPM数据包。The data package generation module 140 is configured to re-execute the target RPM task, obtain the target RPM data package, and replace the original RPM data package with the target RPM data package.
可选地,删除模块130,包括:Optionally, delete module 130, including:
编译序号获取单元,用于获取目标RPM任务对应的编译序号;The compilation sequence number obtaining unit is used to obtain the compilation sequence number corresponding to the target RPM task;
筛选单元,用于利用编译序号筛选数据库中的多个构建信息,得到数据包构建信息;a screening unit, used for screening a plurality of construction information in the database by using the compilation sequence number to obtain data packet construction information;
删除单元,用于删除数据包构建信息。Remove unit, used to remove packet build information.
可选地,编译序号获取单元,包括:Optionally, the compilation sequence number acquisition unit includes:
任务信息获取子单元,用于利用任务编号获取目标RPM任务对应的任务信息;The task information acquisition subunit is used to obtain the task information corresponding to the target RPM task by using the task number;
解析子单元,用于对任务信息进行解析,得到编译序号。The parsing subunit is used to parse the task information to obtain the compilation sequence number.
可选地,任务确定模块120,包括:Optionally, the task determination module 120 includes:
任务信息获取单元,用于利用任务编号确定初始RPM任务,并获取初始RPM任务对应的初始任务信息;A task information acquisition unit, used to determine the initial RPM task by using the task number, and obtain the initial task information corresponding to the initial RPM task;
字段获取单元,用于对初始任务信息进行解析,得到构建字段和状态字段;The field acquisition unit is used to parse the initial task information to obtain the construction field and the status field;
任务确定单元,用于若构建字段不为空,且状态字段为成功,则将初始RPM任务确定为目标RPM任务。The task determination unit is used to determine the initial RPM task as the target RPM task if the build field is not empty and the status field is successful.
可选地,还包括:Optionally, also include:
删除模块,用于若检测到目标RPM数据包对应的删除指令,则删除目标RPM数据包,并从数据库中删除目标RPM数据包对应的第一数据包构建信息。The deletion module is configured to delete the target RPM data package if the deletion instruction corresponding to the target RPM data package is detected, and delete the first data package construction information corresponding to the target RPM data package from the database.
可选地,还包括:Optionally, also include:
备份模块,用于生成目标RPM数据包对应的备份数据包,并将备份数据包存储于备份路径。The backup module is used to generate a backup data package corresponding to the target RPM data package, and store the backup data package in the backup path.
可选地,还包括:Optionally, also include:
恢复指令获取模块,用于获取并解析数据包恢复指令,得到目标数据包信息;The recovery instruction acquisition module is used to acquire and parse the data packet recovery instruction to obtain the target data packet information;
存在判断模块,用于判断备份路径下是否存在与目标数据包信息对应的目标备份数据包;an existence judgment module, used for judging whether there is a target backup data packet corresponding to the target data packet information under the backup path;
原始路径保存模块,用于若备份路径下存在目标备份数据包,将目标备份数据包保存至原始路径;The original path saving module is used to save the target backup data package to the original path if the target backup data package exists in the backup path;
构建信息插入模块,用于在数据库中插入目标备份数据包对应的第二数据包构建信息。The construction information insertion module is used for inserting the second data packet construction information corresponding to the target backup data packet in the database.
下面对本申请实施例提供的电子设备进行介绍,下文描述的电子设备与上文描述的数据包更新方法可相互对应参照。The electronic device provided by the embodiments of the present application will be introduced below, and the electronic device described below and the data packet update method described above may refer to each other correspondingly.
请参考图3,图3为本申请实施例提供的一种电子设备的结构示意图。其中电子设备100可以包括处理器101和存储器102,还可以进一步包括多媒体组件103、信息输入/信息输出(I/O)接口104以及通信组件105中的一种或多种。Please refer to FIG. 3 , which is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device 100 may include a processor 101 and a memory 102 , and may further include one or more of a multimedia component 103 , an information input/information output (I/O) interface 104 and a communication component 105 .
其中,处理器101用于控制电子设备100的整体操作,以完成上述的数据包更新方法中的全部或部分步骤;存储器102用于存储各种类型的数据以支持在电子设备100的操作,这些数据例如可以包括用于在该电子设备100上操作的任何应用程序或方法的指令,以及应用程序相关的数据。该存储器102可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,例如静态随机存取存储器(Static Random Access Memory,SRAM)、电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM)、可编程只读存储器(Programmable Read-Only Memory,PROM)、只读存储器(Read-Only Memory,ROM)、磁存储器、快闪存储器、磁盘或光盘中的一种或多种。Wherein, the processor 101 is used to control the overall operation of the electronic device 100 to complete all or part of the steps in the above-mentioned data packet update method; the memory 102 is used to store various types of data to support the operation of the electronic device 100, these Data may include, for example, instructions for any application or method to operate on the electronic device 100, as well as application-related data. The memory 102 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory) Erasable Programmable Read-Only Memory, EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (Read- One or more of Only Memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk.
多媒体组件103可以包括屏幕和音频组件。其中屏幕例如可以是触摸屏,音频组件用于输出和/或输入音频信号。例如,音频组件可以包括一个麦克风,麦克风用于接收外部音频信号。所接收的音频信号可以被进一步存储在存储器102或通过通信组件105发送。音频组件还包括至少一个扬声器,用于输出音频信号。I/O接口104为处理器101和其他接口模块之间提供接口,上述其他接口模块可以是键盘,鼠标,按钮等。这些按钮可以是虚拟按钮或者实体按钮。通信组件105用于电子设备100与其他设备之间进行有线或无线通信。无线通信,例如Wi-Fi,蓝牙,近场通信(Near Field Communication,简称NFC),2G、3G或4G,或它们中的一种或几种的组合,因此相应的该通信组件105可以包括:Wi-Fi部件,蓝牙部件,NFC部件。 Multimedia components 103 may include screen and audio components. Wherein the screen can be, for example, a touch screen, and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 102 or transmitted through the communication component 105 . The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 104 provides an interface between the processor 101 and other interface modules, and the above-mentioned other interface modules may be a keyboard, a mouse, a button, and the like. These buttons can be virtual buttons or physical buttons. The communication component 105 is used for wired or wireless communication between the electronic device 100 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC for short), 2G, 3G or 4G, or one or a combination of them, so the corresponding communication component 105 may include: Wi-Fi parts, Bluetooth parts, NFC parts.
电子设备100可以被一个或多个应用专用集成电路(Application Specific Integrated Circuit,简称ASIC)、数字信号处理器(Digital Signal Processor,简称DSP)、数字信号处理设备(Digital Signal Processing Device,简称DSPD)、可编程逻辑器件(Programmable Logic Device,简称PLD)、现场可编程门阵列(Field Programmable Gate Array,简称FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述实施例给出的数据包更新方法。The electronic device 100 may be implemented by one or more Application Specific Integrated Circuit (ASIC for short), Digital Signal Processor (DSP for short), Digital Signal Processing Device (DSPD for short), Programmable Logic Device (PLD for short), Field Programmable Gate Array (FPGA for short), controller, microcontroller, microprocessor or other electronic components are implemented for implementing the above embodiments The given packet update method.
下面对本申请实施例提供的计算机可读存储介质进行介绍,下文描述的计算机可读存储介质与上文描述的数据包更新方法可相互对应参照。The computer-readable storage medium provided by the embodiments of the present application is introduced below, and the computer-readable storage medium described below and the data packet update method described above may refer to each other correspondingly.
本申请还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现上述的数据包更新方法的步骤。The present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned data packet updating method are implemented.
该计算机可读存储介质可以包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The computer-readable storage medium may include: U disk, removable hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc. that can store program codes medium.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts of the various embodiments may be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method.
本领域技术人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应该认为超出本申请的范围。Those skilled in the art may further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two, in order to clearly illustrate the hardware and software In the above description, the components and steps of each example have been generally described according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods for implementing the described functionality for each particular application, but such implementations should not be considered beyond the scope of this application.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of a method or algorithm described in connection with the embodiments disclosed herein may be directly implemented in hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in random access memory (RAM), internal memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系属于仅仅用来将一个实体或者操作与另一个实体或者操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语包括、包含或者其他任何变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。Finally, it should also be noted that, in this context, relationships such as first and second, etc., are used only to distinguish one entity or operation from another, and do not necessarily require or imply these entities or that there is any such actual relationship or sequence between operations. Furthermore, the terms including, comprising or any other variation are intended to cover non-exclusive inclusion such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or Yes also includes elements inherent to such a process, method, article or apparatus.
本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The principles and implementations of the present application are described herein by using specific examples. The descriptions of the above embodiments are only used to help understand the methods and core ideas of the present application. There will be changes in the specific implementation and application scope. To sum up, the content of this specification should not be construed as a limitation on the application.

Claims (10)

  1. 一种数据包更新方法,其特征在于,包括:A method for updating data packets, comprising:
    获取并解析重新编译指令,得到任务编号;Get and parse the recompile instruction to get the task number;
    根据所述任务编号确定已成功执行的目标RPM任务;Determine the successfully executed target RPM task according to the task number;
    从数据库中删除所述目标RPM任务对应的数据包构建信息;Delete the data package construction information corresponding to the target RPM task from the database;
    重新执行所述目标RPM任务,得到目标RPM数据包,并利用所述目标RPM数据包替换原始RPM数据包。Re-execute the target RPM task to obtain the target RPM data package, and replace the original RPM data package with the target RPM data package.
  2. 根据权利要求1所述的数据包更新方法,其特征在于,所述从数据库中删除所述目标RPM任务对应的数据包构建信息,包括:The data package update method according to claim 1, wherein, the data package construction information corresponding to the target RPM task is deleted from the database, comprising:
    获取所述目标RPM任务对应的编译序号;Obtain the compilation sequence number corresponding to the target RPM task;
    利用所述编译序号筛选所述数据库中的多个构建信息,得到所述数据包构建信息;Use the compilation sequence number to screen a plurality of construction information in the database to obtain the data packet construction information;
    删除所述数据包构建信息。Delete the packet build information.
  3. 根据权利要求2所述的数据包更新方法,其特征在于,所述获取所述目标RPM任务对应的编译序号,包括:The data packet update method according to claim 2, wherein the acquisition of the compilation sequence number corresponding to the target RPM task comprises:
    利用所述任务编号获取所述目标RPM任务对应的任务信息;Utilize the task number to obtain the task information corresponding to the target RPM task;
    对所述任务信息进行解析,得到所述编译序号。The task information is parsed to obtain the compilation serial number.
  4. 根据权利要求1所述的数据包更新方法,其特征在于,所述根据所述任务编号确定已成功执行的目标RPM任务,包括:The data packet update method according to claim 1, wherein the determining of the successfully executed target RPM task according to the task number comprises:
    利用所述任务编号确定初始RPM任务,并获取所述初始RPM任务对应的初始任务信息;Utilize described task number to determine initial RPM task, and obtain the initial task information corresponding to described initial RPM task;
    对所述初始任务信息进行解析,得到构建字段和状态字段;Analyze the initial task information to obtain a build field and a status field;
    若所述构建字段不为空,且所述状态字段为成功,则将所述初始RPM任务确定为所述目标RPM任务。If the build field is not empty and the status field is successful, the initial RPM task is determined to be the target RPM task.
  5. 根据权利要求1所述的数据包更新方法,其特征在于,在所述利用所述目标RPM数据包替换原始RPM数据包之后,还包括:The data package update method according to claim 1, characterized in that, after replacing the original RPM data package with the target RPM data package, further comprising:
    若检测到所述目标RPM数据包对应的删除指令,则删除所述目标RPM数据包,并从所述数据库中删除所述目标RPM数据包对应的第一数据包构建信息。If the deletion instruction corresponding to the target RPM data package is detected, the target RPM data package is deleted, and the first data package construction information corresponding to the target RPM data package is deleted from the database.
  6. 根据权利要求5所述的数据包更新方法,其特征在于,在删除所述目标RPM数据包之前,还包括:The data package update method according to claim 5, characterized in that, before deleting the target RPM data package, further comprising:
    生成所述目标RPM数据包对应的备份数据包,并将所述备份数据包存储于备份路径。A backup data package corresponding to the target RPM data package is generated, and the backup data package is stored in a backup path.
  7. 根据权利要求6所述的数据包更新方法,其特征在于,还包括:The data packet update method according to claim 6, further comprising:
    获取并解析数据包恢复指令,得到目标数据包信息;Obtain and parse the data packet recovery instruction to obtain the target data packet information;
    判断所述备份路径下是否存在与所述目标数据包信息对应的目标备份数据包;Judging whether there is a target backup data packet corresponding to the target data packet information under the backup path;
    若所述备份路径下存在所述目标备份数据包,将所述目标备份数据包保存至原始路径;If the target backup data package exists in the backup path, save the target backup data package to the original path;
    在所述数据库中插入所述目标备份数据包对应的第二数据包构建信息。Insert the second data package construction information corresponding to the target backup data package into the database.
  8. 一种数据包更新装置,其特征在于,包括:A device for updating data packets, comprising:
    获取模块,用于获取并解析重新编译指令,得到任务编号;The acquisition module is used to acquire and parse the recompilation instruction to obtain the task number;
    任务确定模块,用于根据所述任务编号确定已成功执行的目标RPM任务;A task determination module for determining the successfully executed target RPM task according to the task number;
    删除模块,用于从数据库中删除所述目标RPM任务对应的数据包构建信息;A deletion module for deleting the data packet construction information corresponding to the target RPM task from the database;
    数据包生成模块,用于重新执行所述目标RPM任务,得到目标RPM数据包,并利用所述目标RPM数据包替换原始RPM数据包。A data packet generation module is used to re-execute the target RPM task, obtain a target RPM data packet, and replace the original RPM data packet with the target RPM data packet.
  9. 一种电子设备,其特征在于,包括存储器和处理器,其中:An electronic device, comprising a memory and a processor, wherein:
    所述存储器,用于保存计算机程序;the memory for storing computer programs;
    所述处理器,用于执行所述计算机程序,以实现如权利要求1至7任一项所述的数据包更新方法。The processor is configured to execute the computer program to implement the data packet update method according to any one of claims 1 to 7.
  10. 一种计算机可读存储介质,其特征在于,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求1至7任一项所述的数据包更新方法。A computer-readable storage medium, characterized in that it is used for storing a computer program, wherein when the computer program is executed by a processor, the data packet updating method according to any one of claims 1 to 7 is implemented.
PCT/CN2021/134428 2021-01-07 2021-11-30 Data packet updating method and apparatus, electronic device, and readable storage medium WO2022148185A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110018516.9 2021-01-07
CN202110018516.9A CN112732300A (en) 2021-01-07 2021-01-07 Data packet updating method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
WO2022148185A1 true WO2022148185A1 (en) 2022-07-14

Family

ID=75590986

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/134428 WO2022148185A1 (en) 2021-01-07 2021-11-30 Data packet updating method and apparatus, electronic device, and readable storage medium

Country Status (2)

Country Link
CN (1) CN112732300A (en)
WO (1) WO2022148185A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116909619A (en) * 2023-09-07 2023-10-20 北京四象爱数科技有限公司 Satellite software on-orbit reconstruction method, device and medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732300A (en) * 2021-01-07 2021-04-30 苏州浪潮智能科技有限公司 Data packet updating method and device, electronic equipment and readable storage medium
CN113721918B (en) * 2021-08-06 2023-08-04 苏州浪潮智能科技有限公司 Method and device for compiling and making software source based on koji

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446759A (en) * 2014-08-28 2016-03-30 阿里巴巴集团控股有限公司 Rpm package updating method and equipment
CN108027722A (en) * 2015-11-20 2018-05-11 谷歌有限责任公司 The dynamically renewal application in compiling and deployment
WO2018120213A1 (en) * 2016-12-30 2018-07-05 深圳配天智能技术研究院有限公司 Firmware updating method and controller
CN110990020A (en) * 2019-11-24 2020-04-10 苏州浪潮智能科技有限公司 Software compiling method and device, electronic equipment and storage medium
CN111258850A (en) * 2020-01-13 2020-06-09 奇安信科技集团股份有限公司 Method and device for updating software information based on Linux system
CN112732300A (en) * 2021-01-07 2021-04-30 苏州浪潮智能科技有限公司 Data packet updating method and device, electronic equipment and readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446759A (en) * 2014-08-28 2016-03-30 阿里巴巴集团控股有限公司 Rpm package updating method and equipment
CN108027722A (en) * 2015-11-20 2018-05-11 谷歌有限责任公司 The dynamically renewal application in compiling and deployment
WO2018120213A1 (en) * 2016-12-30 2018-07-05 深圳配天智能技术研究院有限公司 Firmware updating method and controller
CN110990020A (en) * 2019-11-24 2020-04-10 苏州浪潮智能科技有限公司 Software compiling method and device, electronic equipment and storage medium
CN111258850A (en) * 2020-01-13 2020-06-09 奇安信科技集团股份有限公司 Method and device for updating software information based on Linux system
CN112732300A (en) * 2021-01-07 2021-04-30 苏州浪潮智能科技有限公司 Data packet updating method and device, electronic equipment and readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116909619A (en) * 2023-09-07 2023-10-20 北京四象爱数科技有限公司 Satellite software on-orbit reconstruction method, device and medium

Also Published As

Publication number Publication date
CN112732300A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
WO2022148185A1 (en) Data packet updating method and apparatus, electronic device, and readable storage medium
US11853774B2 (en) Dynamically loaded plugin architecture
KR101840996B1 (en) Checkpoints for a file system
US10353807B2 (en) Application development management
US9104797B1 (en) Efficient cloud-based annotation of crash reports
WO2022111097A1 (en) File update method and apparatus, device and storage medium
WO2017193885A1 (en) Application starting method and apparatus
WO2023070823A1 (en) Bootloader loading method, apparatus and system, electronic device and medium
WO2013182051A1 (en) Software installation method, terminal, system and computer storage medium
US9575827B2 (en) Memory management program, memory management method, and memory management device
US20230126437A1 (en) Service processing method and apparatus, electronic device, and storage medium
WO2023213263A1 (en) Program compiling method, program starting method, and device and storage medium
US10409567B2 (en) Trimming unused dependencies using package graph and module graph
US20150254309A1 (en) Operation search method and operation search apparatus
US8584080B2 (en) Modeling and generating computer software product line variants
US20130080751A1 (en) Method and device for updating bios program for computer system
WO2022156277A1 (en) Application program installation method and apparatus, and computing device and readable storage medium
US9459883B2 (en) Modifying disk images
CN109284222B (en) Software unit, project testing method, device and equipment in data processing system
TW201324347A (en) System and method for managing commands of function module
US20140026139A1 (en) Information processing apparatus and analysis method
KR20130040636A (en) Method for generating boot image for fast booting and image forming apparatus for performing the same, method for performing fast booting and image forming apparatus for performing the same
KR101850272B1 (en) Method for updating boot image for fast booting and image forming apparatus for performing the same
US8850399B2 (en) Software development using code retraction and background warm up
US20200097172A1 (en) Mounting a drive to multiple computing systems

Legal Events

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

Ref document number: 21917226

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21917226

Country of ref document: EP

Kind code of ref document: A1