A data processing system for updating service files

CN117472405BActive Publication Date: 2026-10-20TEER ZHUOXIN TECH (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311457305.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-03
Publication Date
2026-10-20
Estimated Expiration
2043-11-03

AI Technical Summary

Technical Problem

[0004]上述现有技术中,当需要更新的服务数量过多时,若采用原有的更新次数和每批次的更新数量会造成更新时间过长

Benefits of technology

[0011]当初始服务文件的总数量S小于S0时,此时按照预设的次数对服务进行更新,并在更新后对待执行服务文件的日志进行观察,当日志正常时代表更新过程及运行过程中并未存在bug,此时启动下一次更新,重复此步骤直到更新结束。当初始服务文件的总数量S大于S0时,此时按照预设的次数进行更新时间较长,此时根据预设的运行总时长对更新策略进行动态调整,缩短实际更新时间。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117472405B_ABST
    Figure CN117472405B_ABST
Patent Text Reader

Abstract

The application provides a data processing system for updating service files, which comprises an initial service file set table, a processor and a memory storing a computer program, wherein the computer program is used to acquire an initial file information set when executed by the processor; a preset updating strategy is adopted when the total number of initial service files is less than a preset threshold; and the updating strategy is dynamically adjusted according to a preset total running time when the total number of initial service files is greater than the preset threshold, so as to reduce the updating time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer software, and in particular to a data processing system for updating service files. Background Technology

[0002] Kubernetes clusters are an open-source container orchestration platform that automates many of the manual tasks involved in deploying, managing, and scaling containerized applications, and can deploy hosts across on-premises, public cloud, private cloud, or hybrid cloud.

[0003] To facilitate easier management and dynamic updates, some enterprises currently deploy their applications entirely within a Kubernetes (K8S) cluster. When an application version needs to be updated, a strategy of multiple updates is employed to prevent bugs in the new version from affecting the overall service.

[0004] In the aforementioned prior art, when the number of services that need to be updated is too large, using the original number of updates and the number of updates per batch will result in an excessively long update time. Summary of the Invention

[0005] To address the aforementioned technical problems, the technical solution adopted by this invention is as follows:

[0006] A data processing system for updating service files, the system comprising: an initial service file set table A = {A1, A2, ..., A...} i , ..., A m}, processor and memory storing computer programs, wherein A i ={A i 1 A i 2 , ..., A i j , ..., A i n(i)}, A i j This refers to the j-th initial service file corresponding to the i-th initial service, where i = 1, 2, ..., m, m is the number of initial services, and j = 1, 2, ..., n(i) is the number of initial service files corresponding to the i-th initial service. When the computer program is executed by the processor, the following steps are implemented:

[0007] S100, Obtain the initial file information set B = {B1, B2, ..., B} corresponding to A. i , ..., B m},B i ={B i 1 B i 2 , ..., B ij , ..., B i n(i)}, B i j Refers to A i j The corresponding initial service file information, which includes the initial service file name string and the initial service file version string;

[0008] S200, when S < S0, B is divided into V1 version updates to obtain the updated service files, where S is the initial total number of service files and S0 is the service file number threshold.

[0009] S300, when S≥S0, B is divided into V2 versions for version update, and the updated service file set is obtained.

[0010] The present invention has at least the following beneficial effects:

[0011] When the total number of initial service files, S, is less than S0, the service is updated a preset number of times. After the update, the logs of the service files to be executed are observed. If the logs are normal, it means there are no bugs in the update and execution process. At this point, the next update is started, and this step is repeated until the update is complete. When the total number of initial service files, S, is greater than S0, the update time is longer than the preset number of times. In this case, the update strategy is dynamically adjusted according to the preset total execution time to shorten the actual update time. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 A flowchart of a data processing system for updating service files provided in an embodiment of the present invention. Detailed Implementation

[0014] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0016] This invention provides a data processing system for updating service files, the system comprising: an initial service file set table A = {A1, A2, ..., A...} i , ..., A m}, processor and memory storing computer programs, wherein A i ={A i 1 A i 2 , ..., A i j , ..., A i n(i)}, A i j This refers to the j-th initial service file corresponding to the i-th initial service, where i = 1, 2, ..., m, m is the number of initial services, and j = 1, 2, ..., n(i) is the number of initial service files corresponding to the i-th initial service. When the computer program is executed by the processor, it implements the following steps, such as... Figure 1 As shown:

[0017] S100, Obtain the initial file information set B = {B1, B2, ..., B} corresponding to A. i , ..., B m},B i ={B i 1 B i 2 , ..., B i j , ..., B i n(i)}, B i j Refers to A i j The corresponding initial service file information includes the initial service file name string and the initial service file version string.

[0018] Specifically, each B i The version strings of the initial service files in j are all consistent.

[0019] The above, B i j includes the initial service file name string and the initial service file version string. Different versions of the initial service file have different names, thus enabling the function of different versions of the initial service file to coexist in the initial service.

[0020] Furthermore, the initial service refers to the service executed by any server in the K8S service cluster.

[0021] Specifically, the initial service file refers to any service file located on any server in the K8S service cluster.

[0022] S200, when S < S0, B is divided into V1 versions for version update to obtain the updated service file. Here, S is the initial total number of service files, and S0 is the service file number threshold. Those skilled in the art can set the service file number threshold according to actual needs, which will not be elaborated here.

[0023] Specifically, S meets the following conditions:

[0024] S=∑ m i=1 n(i).

[0025] Specifically, step S200 also includes the following steps:

[0026] S201, Obtain the first intermediate service file set C = {C1, C2, ..., C...} x , ..., C p}, C x It refers to the x-th first intermediate service file list, where x = 1, 2, ..., p, and p is the number of first intermediate service file lists.

[0027] Specifically, V1 = p.

[0028] Furthermore, C 0 x -C 0 x-1 =K1, where C 0 x C x The corresponding number of the first intermediate service files, C 0 x-1 C x-1 The corresponding number of first intermediate service files, K1 is the difference in the number of first intermediate service file lists between two consecutive times, which is set by those skilled in the art according to actual needs, and will not be elaborated here.

[0029] Furthermore, C x This refers to D x-1 Extract K 0 x A list of files generated from the initial service file.

[0030] Specifically, D x-1 It is obtained from the first key intermediate service file set D corresponding to C, where D = {D1, D2, ..., D}. x , ..., D p-1}, D x ={D 1 x D 2 x , ..., D r x , ..., D s(x) x}, D r x It refers to C x The corresponding first critical intermediate service file in the first critical intermediate service file list, r = 1, 2, ..., s(x), where s(x) is C x The corresponding number of the first critical intermediate service files.

[0031] Specifically, D r x This refers to D x-1 Delete C x The remaining list of files.

[0032] Furthermore, when x = 1, D1 refers to the list of the first intermediate service files remaining after C1 is deleted from A.

[0033] Furthermore, when x = p, D p It is null.

[0034] Specifically, K 0 x The following conditions must be met:

[0035] K 0 x =K 0 +x*K1, where K 0 This refers to the preset number of initial service files to be extracted and K 0 =K1.

[0036] The above can be understood as follows: when S < S0, B is updated in V1 times, with K1 service files updated each time. This multiple updates facilitate the observation and timely fixing of bugs during the update process.

[0037] S203, after updating the first intermediate service file list in the order of C's sequence number, an updated service file set is generated.

[0038] Specifically, step S203 also includes the following steps:

[0039] S2031, when updating Cx according to the order of C's sequence number, obtain the set of service files to be executed F = {F1, ..., F...} x-1}, F x-1 It refers to C x-1 The corresponding updated first intermediate service file.

[0040] S2032, run all updated first intermediate service files in F, and obtain the logs corresponding to all updated first intermediate service files in F.

[0041] S2033, when all updated first intermediate service files in F have no abnormal results in their corresponding logs, then C... x Update and generate C x The corresponding list of service files to be executed, F x And F x Insert into F to get a new F.

[0042] Specifically, F x Any pending service file refers to obtaining C from B. x The process of updating the list of first intermediate service files involves taking the initial service file information corresponding to the first intermediate service file and replacing the initial service file version string in the initial service file information with the new service file version string.

[0043] S2034, run all updated first intermediate service files in the new F, and obtain the logs corresponding to all updated first intermediate service files in the new F.

[0044] S2035, until C is obtained p The corresponding log of the service file to be executed and C p If the logs of all the service files to be executed show no abnormal results, generate an updated set of service files from all the service files to be executed.

[0045] The above can be understood as, in each iteration of C... x During the update process, the updated service is assessed by observing the logs corresponding to the first intermediate service file. If the logs for the first intermediate service file are normal, it indicates that the update will not negatively impact the service, and the next update can proceed, thereby reducing post-update C... x A bug occurred, causing a service interruption.

[0046] S300, when S≥S0, B is divided into V2 versions for version update, and the updated service file set is obtained.

[0047] Specifically, the S300 procedure also includes the following steps:

[0048] S301, Obtain the second intermediate service file set U = {U1, U2, ..., U...} y , ..., U q}, U y It refers to the y-th second intermediate service file list, where y = 1, 2, ..., q, and q is the number of second intermediate service file lists.

[0049] Specifically, V2 = q.

[0050] Furthermore, U 0 Y -U 0 y-1 =K2, where U y For U y The corresponding number of second intermediate service files, U 0 y-1 For U y-1 The corresponding number of second intermediate service files, K2 is the difference in the number of second intermediate service file lists between two consecutive times.

[0051] Furthermore, q satisfies the following conditions:

[0052] q = ((T0-S×t1) / (S×t2))-1, where T0 is the preset total running time. Those skilled in the art can set the preset total running time according to actual needs, which will not be elaborated here. The test duration t1 refers to the time taken to update a single service file to be executed. Those skilled in the art can set the test duration according to actual needs, which will not be elaborated here. The observation duration t2 refers to the time taken to run a single service file to be executed. Those skilled in the art can set the observation duration according to actual needs, which will not be elaborated here.

[0053] Furthermore, K2 meets the following conditions:

[0054] K2 = rounddown(S / q).

[0055] As mentioned above, when S≥S0, the total number of initial service files is large. If the update is performed p times as described above, the total time will be long. Therefore, the number of updates here needs to be dynamically adjusted in conjunction with the preset total running time. The update time for each second intermediate service file is t1, and each initial service file needs to be observed for a time length of t2 after the update. It is necessary to ensure that the total time for updating and observing all second intermediate service files is not greater than T0, thereby ensuring that the overall update time can be completed within T0 time.

[0056] Furthermore, U 0 Y It refers to Q y-1 Extract H 0 y A list of files generated from the initial service file.

[0057] Specifically, Q y-1 It is obtained from the second key intermediate service file set Q corresponding to U, where Q = {Q1, Q2, ..., Q}. y Q q-1}, Q y ={Q 1 y Q 2 y Q g y , ..., D z(y) y}, Q g y It refers to U y The corresponding first key intermediate service file in the second key intermediate service file list, g = 1, 2, ..., z(y), z(y) is U y The corresponding number of the first critical intermediate service files.

[0058] Specifically, Q g y It refers to Q y-1 Delete U y The remaining list of files.

[0059] Furthermore, when y=1, Q1 refers to the list of the second intermediate service files remaining after deleting U1 from A.

[0060] Furthermore, when y = p, Q q It is null.

[0061] Specifically, H 0 y The following conditions must be met:

[0062] H 0 y =H0 +y*K2, where H 0 This refers to the preset number of initial service files to be extracted and H 0 =K2.

[0063] S303, after updating the second intermediate service file list in the order of U's sequence number, an updated service file set is generated.

[0064] Specifically, step S303 also includes the following steps:

[0065] S3031, when sorting U according to its serial number... y During the update, obtain the set of service files to be executed, E = {E1, ..., E...} y-1}, E y-1 It refers to U y-1 The corresponding updated second intermediate service file.

[0066] S3032, run all updated second intermediate service files in E, and obtain the logs corresponding to all updated second intermediate service files in E.

[0067] S3033, when all updated second intermediate service files in E have no abnormal log results, for U y Update and generate U y The corresponding list of service files to be executed, E y And E y Insert into E to obtain a new E.

[0068] Specifically, any service file to be executed in Ey refers to the file obtained from B. y The process of updating the list of second intermediate service files involves taking the initial service file information corresponding to the second intermediate service file and replacing the initial service file version string in the initial service file information with the new service file version string.

[0069] S3034, run all updated second intermediate service files in the new E, and obtain the logs corresponding to all updated second intermediate service files in the new E.

[0070] S3035, until U is obtained q The corresponding log of the service file to be executed and U q If the logs of all the service files to be executed show no abnormal results, generate an updated set of service files from all the service files to be executed.

[0071] The above can be understood as, in each iteration of U yDuring the update process, the updated service is assessed by observing the logs corresponding to the second intermediate service file. If the logs for the second intermediate service file are normal, it indicates that the update will not negatively impact the service, and the next update can proceed, thereby reducing post-update UPS. y A bug occurred, causing a service interruption.

[0072] In another specific embodiment, t2 satisfies the following condition: t2 = t0 + w × Δt, where w is the number of executions, Δt is the running time interval, and t0 is the initial running length.

[0073] In another specific embodiment, when t2 = t0 + w × Δt, step S303 further includes the following step:

[0074] S3031, when sorting U according to its serial number... y During the update, obtain the set of service files to be executed, E = {E1, ..., E...} y-1}, E y-1 It refers to U y-1 The corresponding updated second intermediate service file.

[0075] S3032 runs all updated second intermediate service files in E w+1 times, with the first run having a duration of t0 and the subsequent runs having a duration of Δt.

[0076] S3033: When running all updated second intermediate service files in E for the first time, retrieve the logs corresponding to all updated second intermediate service files in E.

[0077] S3034, when all updated second intermediate service files in E have no abnormal log results, for U y Update;

[0078] S3035, when facing U y During the update, run all the updated second intermediate service files in the remaining W times of E;

[0079] S3036, If an anomaly is found in the log of any updated second intermediate service file within any of the remaining W runs of E, stop running U. y Update.

[0080] S3037, from the updated second intermediate service file in new E up to all updated second intermediate service files in E after run W+1, the logs showed no abnormal results for U. y Update and generate U y The corresponding list of service files to be executed, Ey, and Ey Insert into E to obtain a new E.

[0081] Concrete, E y Any pending service file refers to the file obtained from B. y The process of updating the first intermediate service file list involves taking the initial service file information corresponding to the second intermediate service file and replacing the initial service file version string in the initial service file information with the new service file version string.

[0082] S3038, run all updated second intermediate service files in the new E, and obtain the logs corresponding to all updated second intermediate service files in the new E.

[0083] S3039, until U is obtained q The corresponding log of the service file to be executed and U q If the logs of all the service files to be executed show no abnormal results, generate an updated set of service files from all the service files to be executed.

[0084] As described above, when updating the second intermediate service file, the second intermediate service file is observed after each update, and all previously updated second intermediate service files are also observed. This further reduces the occurrence of bugs affecting the service process during the update process and improves the stability of the update process.

[0085] As described above, when the total number of initial service files S is less than S0, the service is updated a preset number of times. After the update, the logs of the service files to be executed are observed. If the logs are normal, it means there are no bugs in the update and execution process. At this point, the next update is started, and this step is repeated until the update is complete. When the total number of initial service files S is greater than S0, updating a preset number of times takes a long time. Therefore, the number of updates is dynamically adjusted according to the preset total execution time, so that the update process can be completed within T0 time.

[0086] While specific embodiments of the invention have been described in detail by way of example, those skilled in the art should understand that the above examples are for illustrative purposes only and are not intended to limit the scope of the invention. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.

Claims

1. A data processing system for updating service files, characterized in that, The system includes: an initial service file set table A = {A1, A2, ..., A...} i , ..., A m }, processor and memory storing computer programs, wherein A i ={A i 1 A i 2 , ..., A i j , ..., A i n(i) }, A i j This refers to the j-th initial service file corresponding to the i-th initial service, where i = 1, 2, ..., m, m is the number of initial services, and j = 1, 2, ..., n(i) is the number of initial service files corresponding to the i-th initial service. When the computer program is executed by the processor, the following steps are implemented: S100, Obtain the initial file information set B = {B1, B2, ..., B} corresponding to A. i , ..., B m },B i ={B i 1 B i 2 , ..., B i j , ..., B i n(i) }, B i j Refers to A i j The corresponding initial service file information, which includes the initial service file name string and the initial service file version string; S200, when S < S0, A is divided into V1 versions for version update to obtain the updated service file, where S is the initial total number of service files and S0 is the service file number threshold. S300, when S≥S0, performs version updates on A in V2 steps to obtain the updated service file set; step S300 also includes the following steps: S301, Obtain the second intermediate service file set U={U1, U2, ..., U...} y , ..., U q }, U y This refers to the y-th second intermediate service file list, where y = 1, 2, ..., q, and q is the number of second intermediate service file lists; V2 = q, U 0 Y -U 0 y-1 =K2, where U y For U y The corresponding number of second intermediate service files, U 0 y-1 For U y-1 The corresponding number of second intermediate service files, K2 is the difference in the number of second intermediate service file lists between two consecutive times; where q meets the following condition: q=((T0-S×t1) / (S×t2))-1, T0 is the preset total running time; Wherein, K2 satisfies the following condition: K2 = rounddown(S / q); Among them, U 0 Y It refers to Q y-1 Extract H 0 y A list of files generated from the initial service file, Q y-1 It is obtained from the second key intermediate service file set Q corresponding to U, where Q = {Q1, Q2, ..., Q}. y Q q-1 }, Q y ={Q 1 y Q 2 y Q g y , ..., D z(y) y }, Q g y It refers to U y The corresponding first key intermediate service file in the second key intermediate service file list, g=1,2……z(y), z(y) is U y The corresponding number of the first critical intermediate service files; where, when y=1, Q1 refers to the list of the second intermediate service files remaining after deleting U1 from A; where, when y=p, Q q It is null; where H 0 y H meets the following conditions: 0 y =H 0 +y*K2, where H 0 This refers to the preset number of initial service files to be extracted and H 0 =K2; S303, after updating the second intermediate service file list in the order of U's sequence number, an updated service file set is generated.

2. The data processing system for updating service files according to claim 1, characterized in that, Every B i j The version strings in the initial service files are all consistent.

3. The data processing system for updating service files according to claim 2, characterized in that, The initial service refers to the service executed by any server in the K8S service cluster.

4. The data processing system for updating service files according to claim 1, characterized in that, S satisfies the following condition: S = ∑ m i=1 n(i).

5. The data processing system for updating service files according to claim 1, characterized in that, The S200 procedure also includes the following steps: S201, Obtain the first intermediate service file set C={C1, C2, ..., C...} x , ..., C p }, C x This refers to the x-th first intermediate service file list, where x = 1, 2, ..., p, and p is the number of first intermediate service file lists. S203, after updating the first intermediate service file list in the order of C's sequence number, an updated service file set is generated.

6. The data processing system for updating service files according to claim 5, characterized in that, C x This refers to D x-1 Extract K 0 x A list of files generated from the initial service files, where D x-1 It is obtained from the first key intermediate service file set D corresponding to C, where D = {D1, D2, ..., D}. x , ..., D p-1 }, D x ={D 1 x D 2 x , ..., D r x , ..., D s(x) x }, D r x It refers to C x The corresponding first critical intermediate service file in the first critical intermediate service file list is the r-th first critical intermediate service file, where r = 1, 2, ..., s(x), and s(x) is C. x The corresponding number of the first critical intermediate service files.

7. The data processing system for updating service files according to claim 6, characterized in that, D r x This refers to D x-1 Delete C x The remaining list of files.

8. The data processing system for updating service files according to claim 6, characterized in that, K 0 x The following conditions must be met: K 0 x =K 0 +x*K1, where K 0 This refers to the preset number of initial service files to be extracted and K 0 =K1, where K1 is the difference in the number of first intermediate service file lists between two consecutive pairs.

9. The data processing system for updating service files according to claim 5, characterized in that, Step S203 also includes the following steps: S2031, when updating Cx according to the order of C's sequence number, obtain the set of service files to be executed F = {F1, ..., F...} x-1 }, F x-1 It refers to C x-1 The corresponding updated first intermediate service file; S2032, run all updated first intermediate service files in F, and obtain the logs corresponding to all updated first intermediate service files in F; S2033, when all updated first intermediate service files in F have no abnormal results in their corresponding logs, then C... x Update and generate C x The corresponding list of service files to be executed, F x And F x Insert into F to get a new F; F x Any pending service file refers to obtaining C from B. x The initial service file information corresponding to the first intermediate service file is obtained, and the initial service file version string in the initial service file information is replaced with the new service file version string; S2034, run all updated first intermediate service files in the new F, and obtain the logs corresponding to all updated first intermediate service files in the new F; S2035, until C is obtained p The corresponding log of the service file to be executed and C p If the logs of all the service files to be executed show no abnormal results, generate an updated set of service files from all the service files to be executed.

Citation Information

Patent Citations

  • Data processing system for obtaining labels

    CN116561388A

  • Version deployment method and device, electronic equipment and storage medium

    CN116931962A