Program switch design method and device, electronic equipment and storage medium

By determining and deploying target switch logic in software development, the problem of rapid increase in the number of switches and difficulty in offline old switches is solved, and the high reusability and low code intrusion of switches are achieved.

CN119536855APending Publication Date: 2025-02-28AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411668291.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

During the software development process, due to the frequent logic modification of the application, the number of switches increases rapidly, resulting in frequent and sensitive application updates, and it is difficult to offline old switches, affecting system optimization.

Method used

By determining the target switch logic associated with the target original program and deploying it on the program section, the switch logic is determined based on the interface function, the accurate insertion and update of the switch logic is achieved, and the reusability of the switch is improved.

Benefits of technology

Improves the reusability of switches, reduces intrusion into original code, simplifies the management and maintenance of switches, and reduces unnecessary switch retention in system optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119536855A_ABST
    Figure CN119536855A_ABST
Patent Text Reader

Abstract

The invention discloses a program switch design method and device, electronic equipment and a storage medium. The method comprises the following steps: determining target switch logic associated with a target original program; the target switch logic is deployed on a program section of the target original program, and the program section is arranged before the target original program is called; the target switch logic is determined based on an interface function of the target original program; determining to execute the target original program or the update program based on the target switch logic; the updating program is a program obtained after the target original program is updated. According to the technical scheme, the reusability of the switch is improved, and invasion to original codes is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer software development, and in particular to a program switch design method, device, electronic equipment and storage medium. Background Art

[0002] Due to the importance and sensitivity of the corresponding operating systems, different applications often require the introduction of various switches during changes. The introduction of switches presents several challenges: each change involving logic modification requires the addition of numerous switches, leading to a growing number of switches in the code and frequent and sensitive application updates. Furthermore, due to the unique nature of some applications, switch removal is handled with extreme caution, especially when decommissioning older switches, which are typically part of larger system optimizations. Consequently, the increasing number of switches makes their removal difficult. Summary of the Invention

[0003] The present invention provides a program switch design method, device, electronic device and storage medium to improve the reusability of the switch and reduce the intrusion into the original code.

[0004] According to one aspect of the present invention, a program switch design method is provided, the method comprising:

[0005] Determining a target switch logic associated with a target original program; wherein the target switch logic is deployed on a program section of the target original program, the program section being set before calling the target original program; and wherein the target switch logic is determined based on an interface function of the target original program.

[0006] Based on the target switch logic, it is determined to execute a target original program or an updated program; the updated program is a program obtained by updating the target original program.

[0007] According to another aspect of the present invention, there is provided a program switch design device, the device comprising:

[0008] a switch logic determination module, configured to determine a target switch logic associated with a target original program; the target switch logic being deployed on a program section of the target original program, the program section being provided before the target original program is called; the target switch logic being determined based on an interface function of the target original program;

[0009] The judgment module is used to determine whether to execute a target original program or an updated program based on the target switch logic; the updated program is a program obtained by updating the target original program.

[0010] According to another aspect of the present invention, an electronic device is provided, comprising:

[0011] at least one processor; and

[0012] a memory communicatively connected to the at least one processor; wherein,

[0013] The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the program switch design method according to any embodiment of the present invention.

[0014] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the program switch design method according to any embodiment of the present invention when executed.

[0015] The technical solution of an embodiment of the present invention determines target switch logic associated with a target original program; the target switch logic is deployed on a program section of the target original program, which is set before the target original program is called; the target switch logic is determined based on the interface functions of the target original program; and the switch logic is accurately inserted without intruding the target original program. Furthermore, based on the target switch logic, the target original program or an updated program is determined to be executed; the updated program is a program that updates the target original program, which improves the reusability of the switch and reduces intrusion into the original code.

[0016] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 is a flow chart of a program switch design method provided according to an embodiment of the present invention;

[0019] Figure 2 is a schematic diagram of the relationship between a switch and an original program applicable to an embodiment of the present invention;

[0020] Figure 3 1 is a schematic structural diagram of a program switch design device provided according to an embodiment of the present invention;

[0021] Figure 41 is a schematic structural diagram of an electronic device for implementing the program switch design method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0023] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0024] Example 1

[0025] Figure 1 This is a flowchart of a program switch design method provided by an embodiment of the present invention. This embodiment is applicable to the design of a program switch. The method can be executed by a program switch design device. The program switch design device can be implemented in the form of hardware and / or software. The program switch design device can be configured in any electronic device with network communication function. Figure 1 As shown, the program switch design method of the present invention includes:

[0026] S110, determining a target switch logic associated with the target original program; the target switch logic is deployed on a program section of the target original program, and the program section is set before calling the target original program; the target switch logic is determined based on an interface function of the target original program.

[0027] The target original program may be the original code that needs to be tested, and the target switch logic may be understood as the judgment logic before the judgment master executes the test target original program.

[0028] Specifically, the program aspect can be set before calling the target original program through dynamic proxy, so that the target switch logic can be inserted into the program aspect to realize the judgment of execution logic in the form of a switch. If the target switch logic is no longer used later, it can be directly deleted to avoid affecting the stable operation of the entire program.

[0029] In this embodiment, determining the target switch logic associated with the target original program includes steps A1-A3:

[0030] Step A1: Determine a switch matching table; the switch matching table is used to describe the correspondence between different interfaces and the switch table structure, and the switch table structure is used to indicate information for generating switch logic.

[0031] Step A2: Obtain interface information of the target original program, and determine a target switch table structure associated with the target original program based on the interface information and the switch matching table; the interface information is used to indicate the interface function.

[0032] Specifically, the switch table structure includes switch group information, switch name, switch validity period, and switch status. For example, see Table 1 below.

[0033] Table 1

[0034]

[0035] Different switch table structures correspond to the contents in Table 1, and the structural identification information of the switch table structures corresponding to different interfaces can be determined. The key switch matching table based on the matching relationship between the structural identification information and the interface information is used to determine the target switch table structure associated with the target original program based on the interface information and the switch matching table after the interface information corresponding to the target original program is determined.

[0036] Furthermore, if the interface information of the target original program indicates modification of a single interface, the switch grouping information is a non-grouping switch, and the switch name is composed of the interface type and the identification information of the target original program; the non-grouping switch is used to describe the indication information of a single interface;

[0037] If the interface information of the target original program indicates modifications to a preset number of interfaces, and the preset number of interfaces have the same function, the switch grouping information is a grouped switch, and the switch name includes the first name information of the main switch and the second name information of the preset number of sub-switches. The grouped switch is used to describe the indication information of multiple interfaces. The first name information and the second name information can be customized or determined according to a preset definition rule.

[0038] Step A3: Generate target switch logic associated with the target original program based on the target switch table structure; the target switch logic is a program language that describes the target switch table structure.

[0039] Specifically, the target switch table structure is converted into target switch logic associated with the target original program based on a preset plug-in; the target switch logic is a programming language that describes the target switch table structure. The preset plug-in can be an IDE plug-in to reduce the risk of errors introduced by manual code editing.

[0040] The technical solution of this embodiment determines a switch matching table; the switch matching table is used to describe the correspondence between different interfaces and the switch table structure, and the switch table structure is used to indicate information for generating switch logic. This facilitates, after obtaining the interface information of the target original program, accurately determining the target switch table structure associated with the target original program based on the interface information and the switch matching table; the interface information is used to indicate the interface function; further, based on the target switch table structure, target switch logic associated with the target original program is generated; the target switch logic is a programming language that describes the target switch table structure, which enables accurate generation of the target switch logic, facilitates subsequent direct deployment of the target switch logic on the program section of the target original program, avoids affecting the target original program, and facilitates deletion of the target switch logic at any time.

[0041] S120 , determining to execute a target original program or an updated program based on the target switch logic; the updated program is a program obtained by updating the target original program.

[0042] Specifically, the target switch logic accurately determines whether to execute the target original program or the updated program based on the switch validity period and switch status, thereby realizing dynamic switching between the target original program and the updated program, avoiding errors in the updated program and the inability to switch back to the target original program, which affects the operation of the entire system program.

[0043] In this embodiment, the switch validity period is used to describe the validity of the target switch logic. Based on the target switch logic, the execution of the target original program or updated program is determined. This includes: if the target switch logic exceeds the switch validity period, the updated program is executed, indicating that the updated program's test results meet the application requirements. Further retention of the target original program is unnecessary, and switching back and forth between the target original program and the updated program is unnecessary. The target switch logic is then deleted, reducing the impact of unnecessary switches on program applications throughout the system. If the target switch logic has not exceeded the switch validity period, the execution of the target original program or updated program is determined based on the switch status. This embodiment allows for the rapid removal of failed switches without affecting the stable operation of the system.

[0044] Furthermore, the switch state includes a first state and a second state, the first state is the switch-on state, and the second state is the switch-off state. Determining whether to execute the target original program or the update program according to the switch state includes: if the switch state in the target switch logic is the first state, then executing the update program; if the switch state in the target switch logic is the second state, then executing the target original program, thereby realizing flexible switching of the switch state of the test environment.

[0045] For example, Figure 2 As shown, taking method as the update program and methodold as the target original program as an example, the target switch logic is set on the program section before the target original program using a dynamic proxy method. Before the execution logic arrives, it is necessary to first determine whether the target switch logic exceeds the switch validity period. If it exceeds, method is executed directly. If not, the switch state is determined. If the switch state is the first state, method is executed. If the switch state is the second state, methodold is executed.

[0046] Optionally, after determining to execute the target original program or updated program based on the target switch logic, the method further includes: displaying switch information in the switch table structure corresponding to the target switch logic; the switch information is switch grouping information, switch name, switch validity period and switch status; in response to an editing operation on the switch information, displaying the modified switch information; and generating a modified target switch logic based on the modified switch information.

[0047] Specifically, whether in the program writing process or the program testing process, the target switch logic can be exported through the preset plug-in, and the switch information in the switch table structure corresponding to the target switch logic can be generated based on the target switch logic, and displayed in the actual device for the staff to view and edit, that is, the switch validity period and / or switch status can be directly modified in the display interface, and the modified switch information can be generated. The preset plug-in can generate the modified target switch logic according to the modified switch information. In the subsequent testing process, the script can be used to automatically generate and export the modified target switch logic to determine the execution target original program or update program, thereby realizing the automatic generation and export of the script.

[0048] The technical solution of an embodiment of the present invention determines target switch logic associated with a target original program; the switch logic is deployed on a program section of the target original program, which is set before calling the target original program; the target switch logic is determined based on the interface functions of the target original program; and the switch logic is accurately inserted without intruding the target original program. Furthermore, based on the target switch logic, the target original program or an updated program is determined to be executed; the updated program is a program that updates the target original program, improving the reusability of the switch and reducing intrusion into the original code.

[0049] Example 3

[0050] Figure 3 This is a schematic diagram of the structure of a program switch design device provided by an embodiment of the present invention. This embodiment is applicable to the design of program switches. The program switch design device can be implemented in the form of hardware and / or software. The program switch design device can be configured in any electronic device with network communication function. Figure 3 As shown, the program switch design device of the present invention includes:

[0051] A switch logic determination module 210 is configured to determine a target switch logic associated with a target original program; the switch logic is deployed on a program section of the target original program, the program section being provided before the target original program is called; the target switch logic is determined based on an interface function of the target original program;

[0052] The judgment module 220 is used to determine whether to execute a target original program or an updated program based on the target switch logic; the updated program is a program that is an update of the target original program.

[0053] Based on the above embodiment, optionally, the switch logic determination module includes:

[0054] a matching table determining unit, configured to determine a switch matching table; the switch matching table being used to describe the correspondence between different interfaces and a switch table structure, the switch table structure being used to indicate information for generating switch logic;

[0055] an information acquisition unit, configured to acquire interface information of the target original program, and determine a target switch table structure associated with the target original program based on the interface information and the switch matching table; the interface information is used to indicate an interface function;

[0056] A logic generation unit is configured to generate a target switch logic associated with the target original program based on the target switch table structure; the target switch logic is a program language that describes the target switch table structure.

[0057] Based on the above embodiment, optionally, the switch table structure includes switch group information, switch name, switch validity period and switch status.

[0058] Based on the above embodiment, optionally, the switch validity period is used to describe the validity of the target switch logic, and the judgment module includes a first judgment unit and a second judgment unit. The first judgment unit is used to execute the update program and delete the target switch logic if the target switch logic exceeds the switch validity period; the second judgment unit is used to determine whether to execute the target original program or the update program according to the switch state if the target switch logic does not exceed the switch validity period.

[0059] Based on the above embodiment, optionally, the second judgment unit is also used to execute the update program if the switch state in the target switch logic is a first state; the first state is a switch-on state; if the switch state in the target switch logic is a second state, execute the target original program; the second state is a switch-off state.

[0060] Based on the above embodiment, optionally, the information acquisition unit is also used to: if the interface information of the target original program indicates a modification to a single interface, the switch grouping information is a non-grouped switch, and the switch name is composed of the interface type and the identification information of the target original program; the non-grouped switch is used to describe the indication information of a single interface; if the interface information of the target original program indicates a modification to a preset number of interfaces, and the preset number of interfaces are interfaces with the same function, the switch grouping information is a grouped switch, and the switch name includes the first name information of the main switch and the second name information of a preset number of sub-switches; the grouped switch is used to describe the indication information of multiple interfaces.

[0061] Based on the above embodiment, optionally, the judgment module further includes a display unit, which is used to display switch information in the switch table structure corresponding to the target switch logic; the switch information includes switch grouping information, switch name, switch validity period and switch status; in response to an editing operation on the switch information, the modified switch information is displayed; and a modified target switch logic is generated based on the modified switch information.

[0062] The program switch design device provided in the embodiment of the present invention can execute the program switch design method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0063] Example 4

[0064] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0065] Figure 4A schematic diagram of the structure of an electronic device that can be used to implement the program switch design method of an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0066] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0067] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0068] The processor 11 may be any general-purpose and / or specialized processing component with processing and computing capabilities. Examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors for running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the program switch design method.

[0069] In some embodiments, the program switch design method can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the program switch design method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the program switch design method in any other suitable manner (e.g., via firmware).

[0070] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0071] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0072] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0073] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0074] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0075] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0076] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0077] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A program switch design method, characterized in that: The method comprises: Determine a target switch logic associated with the target original program; the target switch logic is deployed on a program section of the target original program, the program section is set before calling the target original program; the target switch logic is determined based on an interface function of the target original program; Based on the target switch logic, it is determined to execute a target original program or an updated program; the updated program is a program after updating the target original program.

2. The method according to claim 1, characterized in that Determine the target switch logic associated with the target original program, including: Determine a switch matching table; the switch matching table is used to describe the correspondence between different interfaces and the switch table structure, and the switch table structure is used to indicate information for generating switch logic; Acquire interface information of the target original program, and determine a target switch table structure associated with the target original program based on the interface information and the switch matching table; the interface information is used to indicate an interface function; Based on the target switch table structure, a target switch logic associated with the target original program is generated; the target switch logic is a program language that describes the target switch table structure.

3. The method according to claim 2, characterized in that The switch table structure includes switch grouping information, switch name, switch validity period and switch status.

4. The method according to claim 3, characterized in that The switch validity period is used to describe the validity of the target switch logic. Based on the target switch logic, determining to execute the target original program or update program includes: If the target switch logic exceeds the switch validity period, executing an update procedure and deleting the target switch logic; If the target switch logic does not exceed the switch validity period, the target original program or update program is executed according to the switch state.

5. The method according to claim 4, characterized in that Determining the execution target original program or update program according to the switch state includes: If the switch state in the target switch logic is a first state, executing the update program; the first state is a switch open state; If the switch state in the target switch logic is the second state, the target original program is executed; the second state is the switch disconnected state.

6. The method according to claim 3, characterized in that Determining a target switch table structure associated with the target original program based on the interface information and the switch matching table includes: If the interface information of the target original program indicates modification of a single interface, the switch grouping information is a non-grouping switch, and the switch name is composed of the interface type and the identification information of the target original program; the non-grouping switch is used to describe the indication information of a single interface; If the interface information of the target original program indicates modification of a preset number of interfaces, and the preset number of interfaces are interfaces with the same function, then the switch grouping information is a grouped switch, and the switch name includes the first name information of the main switch and the second name information of the preset number of sub-switches; the grouped switch is used to describe the indication information of multiple interfaces.

7. The method according to claim 3, characterized in that After determining to execute the target original program or the updated program based on the target switch logic, the method further includes: Display the switch information in the switch table structure corresponding to the target switch logic; the switch information includes switch group information, switch name, switch validity period and switch status; In response to an editing operation on the switch information, displaying the modified switch information; A modified target switch logic is generated based on the modified switch information.

8. A program switch design device, characterized in that: The device comprises: A switch logic determination module, used to determine a target switch logic associated with a target original program; the target switch logic is deployed on a program section of the target original program, the program section is set before calling the target original program; the target switch logic is determined based on an interface function of the target original program; The judgment module is used to determine whether to execute a target original program or an updated program based on the target switch logic; the updated program is a program after updating the target original program.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the program switch design method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the program switch design method according to any one of claims 1 to 7 when executed.