Stack-based on-site operation panel multi-interface switching implementation method and on-site operation panel

By using a stack structure to manage interface numbers in the field operation panel, the problems of user interface switching complexity and resource consumption are solved, and simplified multi-interface switching and predictable interface behavior are achieved.

CN118819715BActive Publication Date: 2025-10-17FUJIAN NORMAL UNIV +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410904060.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2025-10-17
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

In the prior art, the interface switching method of complex systems increases the cognitive burden on users. Frequent switching in resource-constrained embedded systems consumes too much processing power and memory, and it is difficult for users to understand the interface structure and switching path.

Method used

A stack-based data structure is used to utilize the last-in-first-out feature to number each interface of the on-site operation panel, and the interface numbers are stored and managed through the stack to achieve interface switching and simplify the interface switching process.

Benefits of technology

It reduces program complexity, enables users to predict interface switching behavior, easily roll back and enter the target interface, simplifies the multi-interface switching process, and reduces resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118819715B_ABST
    Figure CN118819715B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on stack's field operation panel multi-interface switching implementation method and field operation panel, it is related to liquid crystal display screen multi-interface display technical field, comprising the following steps: the display function corresponding to each interface of field operation panel is numbered;A null stack is constructed, and the number corresponding to each interface display function is stored in null stack;When entering a target interface, the number corresponding to the display function of target interface is stacked, and whether the number exists in the stack is judged and handled;The number corresponding to the display function of target interface is placed in the top position of stack, and the display function corresponding to the interface number located in the top is called, and interface switching is completed.The application reduces the complexity of program, uses the last-in first-out characteristics of stack, and user can easily know how to "back" to previous interface, how to "enter" target interface, and realizes multi-interface switching.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of liquid crystal display screen multi-interface display, and more particularly to a stack-based on-site operation panel multi-interface switching implementation method and an on-site operation panel. BACKGROUND

[0002] Multiple interface displays can be set on a human-computer interaction interface, and different operation functions are placed on different interfaces according to function units and the like. When needed, interface switching is performed through multi-interface switching technology. Multi-interface switching methods can be implemented based on different technologies. Currently, common methods include page navigation, graphical user interface library and the like.

[0003] An application No. CN201910785521.5 discloses an interface switching method and device. When a user trigger operation for a communication application is detected, an entry selection interface of the communication application is started, an entry option of a communication interface related to a user history operation is displayed in a first area of the entry selection interface, an entry option of a group management function interface related to the user history operation is displayed in a second area of the entry selection interface, and according to a user selection operation for the displayed entry option, the interface corresponding to the selected entry option is switched to. An application No. CN202010177866.5 discloses an interface switching method, device and electronic equipment. When a user interface switching operation is detected, at least two interfaces of at least one target application program are acquired, the acquired interfaces are displayed in a first preset area, and according to a user selection of a target interface identifier in the first preset area, the interface corresponding to the target interface identifier is displayed on the screen, so that the switching between interfaces in an application program or between application programs is facilitated, and the user experience is improved. An application No. CN202311828454.3 discloses an interface switching method, device and electronic equipment. A switching instruction for a target interface is acquired, a target parameter is determined based on the switching instruction, a first image element in the target interface is adjusted to a first style associated with the target parameter, a second image element in the target interface is adjusted to a second style associated with the target parameter, and the first style is different from the second style. An application No. CN202211203511.4 discloses an interface display method and electronic equipment. When the interface displayed by the electronic equipment is a split-screen interface, the user can trigger the electronic equipment to switch the application displayed in the split-screen interface through operation, without the user needing to reopen a desktop or a multi-task interface to switch one or more applications displayed in the split-screen interface, thereby simplifying the user operation and improving the user experience.

[0004] However, these methods have some disadvantages, for example: for complex systems, users can be difficult to understand the structure of the entire system, increasing the cognitive burden of users, if the number of pages is large, users can be confused, do not know how to switch from one interface to another interface; and in resource-limited embedded systems, frequent interface switching can consume too much processing power and memory.

[0005] Therefore, how to provide a simple field operation panel multi-interface switching implementation method is a technical problem that those skilled in the art need to solve. SUMMARY

[0006] Therefore, the present application provides a stack-based field operation panel multi-interface switching implementation method and a field operation panel, which solves the problems in the background art.

[0007] In order to achieve the above-mentioned purpose, the present application provides the following technical solutions:

[0008] A stack-based field operation panel multi-interface switching implementation method, comprising the following steps:

[0009] Numbering the display functions corresponding to each interface of the field operation panel;

[0010] Constructing an empty stack and storing the numbers corresponding to the display functions of each interface in the empty stack;

[0011] When entering a target interface, performing a stack operation on the number corresponding to the display function of the target interface, and judging and processing whether the number exists in the stack;

[0012] Placing the number corresponding to the display function of the target interface at the top of the stack, calling the display function corresponding to the interface number at the top of the stack, and completing the interface switching.

[0013] Optionally, the display functions corresponding to each interface of the field operation panel are numbered, specifically:

[0014] One display function corresponds to one interface of the field operation panel, n identifiers are used to represent each interface, and n identifiers are defined as n constants by using macro definition, obtaining n interface numbers 1-n.

[0015] Optionally, when constructing an empty stack, the top of the stack is defined as top, the space size of the stack is defined as stacksize, the stack data element array is defined as data, and the current stack element quantity is defined as len.

[0016] Optionally, when entering a target interface, a stack operation is performed on the number corresponding to the display function of the target interface, specifically including the following steps:

[0017] If the current stack element quantity len is less than the space size stacksize of the stack, the element is stacked, otherwise 0 is returned, and the stacking fails.

[0018] The number corresponding to the display function of the target interface is stacked, the number is located at the top of the stack, and the value of the top position top is increased by 1.

[0019] Optionally, whether the number exists in the stack is judged and processed, which specifically includes the following steps:

[0020] The variable pos is defined to store the position of the original top element, that is, the value of top is assigned to pos.

[0021] All interface numbers in the stack are searched, if the interface number value a in the stack is the same as the newly stacked interface number value, the index of the array of the interface number value a in the stack is defined as i, and the value of the variable pos is set as i.

[0022] From the position i, the loop of data[i]=data[i+1] is executed, the value of i is increased by 1 each time, and the loop is ended until the value of i is equal to the value of len, that is, the interface number of the next stack space position is replaced with the interface number of the original stack space position, finally the repeated interface number is moved from the original stack space position to the top position, and the total number of interface numbers in the stack is not changed, that is, the value of len is not changed.

[0023] If there is no repeated interface number, the value of top+1 is assigned to len.

[0024] Optionally, when the interface is switched, the interface number at the top is obtained at the moment of the interface switching function show_page, and the corresponding interface display function is called according to the obtained interface number; the interface switching function show_page is called in the main function, and the real-time multi-interface is displayed in real time.

[0025] The application further provides a field operation panel, which comprises an embedded microprocessor, a power module, a liquid crystal display module, a key module and a communication module.

[0026] The power module is connected with the liquid crystal display module and the embedded microprocessor respectively.

[0027] The embedded microprocessor is connected with the liquid crystal display module, the key module and the communication module through a liquid crystal display driving circuit, a GPIO port and a communication port respectively.

[0028] Optionally, the embedded microprocessor is internally provided with an empty stack, and the stack structure body of the empty stack comprises a top position top, a space size stacksize of the stack, a stack data element array data and a current stack element quantity len.

[0029] Compared with the prior art, the application provides a stack-based multi-interface switching implementation method for an on-site operation panel and an on-site operation panel, reduces the program complexity, and realizes multi-interface switching by using a simple method, combining a stack data structure, and using the last-in first-out feature of the stack. BRIEF DESCRIPTION OF DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description only constitute a part of the embodiments of the present application, and all other drawings obtained by those of ordinary skill in the art without creative effort based on the provided drawings also belong to the protection scope of the present application.

[0031] Figure 1 A flowchart of the stack-based multi-interface switching implementation method for the on-site operation panel provided by the present application is shown in the figure.

[0032] Figure 2 A flowchart of the interface number into the stack provided by the present application is shown in the figure.

[0033] Figure 3 A schematic diagram of the interface number into the stack provided by the present application is shown in the figure.

[0034] Figure 4 A flowchart of the judgment and processing of whether there is a repeated interface number in the stack provided by the present application is shown in the figure.

[0035] Figure 5 A schematic diagram of the processing of the elements in the stack when there is a repeated interface number in the stack provided by the present application is shown in the figure.

[0036] Figure 6 A flowchart of the implementation of the multi-interface real-time display provided by the present application is shown in the figure.

[0037] Figure 7 A structural diagram of the on-site operation panel provided by the present application is shown in the figure.

[0038] Figure 8 A schematic diagram of the stack structure provided by the present application is shown in the figure. DETAILED DESCRIPTION

[0039] 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 only constitute a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort belong to the protection scope of the present application.

[0040] The embodiment of the present application discloses a stack-based multi-interface switching implementation method for an on-site operation panel, as shown in the accompanying drawings, comprising the following steps: Figure 1

[0041] S1, numbering display functions corresponding to each interface of the on-site operation panel;

[0042] S2, constructing an empty stack and storing the numbers corresponding to the interface display functions in the empty stack;

[0043] S3, when entering a target interface, performing a stack operation on the number corresponding to the display function of the target interface, and judging and processing whether the number exists in the stack;

[0044] S4, placing the number corresponding to the display function of the target interface at the top of the stack, calling the display function corresponding to the interface number at the top of the stack, and completing the interface switching.

[0045] Further, in S1, the display functions corresponding to each interface of the on-site operation panel are numbered, specifically:

[0046] One interface of the on-site operation panel corresponds to one display function, n identifiers are used to represent each interface, and n identifiers are defined as n constants by using macro definition, obtaining n interface numbers 1-n.

[0047] Further, in S2, when constructing an empty stack, the top position of the stack is defined as top, the space size of the stack is defined as stacksize, the stack data element array is defined as data, and the current stack element quantity is defined as len.

[0048] In order to accurately switch and control each interface of the on-site operation panel, the embodiment stores each interface number in the stack as needed and manages it, and the stack operations involved include six kinds:

[0049] (1) creating an empty stack

[0050] Create a stack PageStack based on the stack structure, and set the initial value of top to -1; the initial value of stacksize to a value that can satisfy the number of interfaces as much as possible, for example, 100; the initial value of len to 0; the stack is used to store the interface numbers corresponding to the interfaces that need to be displayed on the liquid crystal screen.

[0051] (2) judging whether the current stack PageStack is an empty stack

[0052] Judge whether the top value of the stack is equal to -1 or the len value of the stack is equal to 0, if it is an empty stack, it indicates that there is no interface display at present, return 1; otherwise, return 0.

[0053] ​(3) Get the top element of the stack PageStack

[0054] First, it is necessary to determine whether the PageStack is empty. If not, the top value is taken as the index of the array data to get the top element, that is, the number of the interface currently displayed on the liquid crystal screen. If it is empty, 0 is returned.

[0055] (4) Insert a new element into the stack PageStack

[0056] First, compare the len of the stack with the stacksize. If the len is less than the stacksize, the stack is not full, that is, there is space in the stack for new elements to be stored. Set top = top + 1 and assign the new element to data[top], that is, add the new interface number to the top of the stack PageStack, and set the current len value to top + 1. At this time, the liquid crystal screen will update the interface in real time according to the interface number at the top of the stack PageStack, and return 1. If the len is equal to the stacksize, the stack is full, and 0 is returned.

[0057] (5) Delete the top element of the stack PageStack

[0058] First, determine whether the PageStack is empty. If not, set a temporary variable e to store the value of the element to be deleted. Set top = top - 1 and len = top + 1, and finally return e, so that the interface number at the top of the original stack is overwritten by the previous interface number, achieving interface rollback. If it is empty, 0 is returned.

[0059] (6) Determine whether the current stack PageStack is full

[0060] First, determine whether the len value of the stack is equal to the stacksize value of the stack. If they are equal, the stack is full, indicating that the interface switching has failed, and 0 is returned. Otherwise, 1 is returned.

[0061] In this embodiment, as shown in Figure 2 , Figure 3 In S3, when entering a target interface, the number corresponding to the display function of the target interface is stacked, and the interface number stacking includes the following steps:

[0062] S301, the interface number stacking module starts, and S302 is executed;

[0063] S302, determine whether the current number of stack elements len is less than the space size stacksize of the stack. If yes, execute S304, otherwise execute S303;

[0064] S303, if the stack-in fails, return 0, and execute S306;

[0065] S304, stack the number corresponding to the display function of the target interface, and make the number be at the top of the stack, and add 1 to the value of the top position top, and use top as an index value to store the target interface number in data, that is, insert the target interface number at the top position, and execute S305;

[0066] S305, if the stack-in succeeds, return 1, and execute S306;

[0067] S306, exit the module.

[0068] The frequent multi-interface switching operation causes a large number of repeated elements to be stored in the stack, thereby causing the stack to be full. Therefore, the embodiment provides a new stack-in operation, which judges and processes whether there is a repeated interface number in the stack, as shown in Figure 4 、 Figure 5 and specifically includes the following steps:

[0069] S311, the module of judging and processing whether there is a repeated interface number in the stack starts, and executes S312;

[0070] S312, define a variable pos to store the position of the original top element, that is, assign the value of top to pos, and execute S313;

[0071] S313, traverse and find all interface numbers in the stack, and execute S314;

[0072] S314, judge whether there is an interface number value a in the stack that is the same as the interface number value newly stacked at this time, if yes, execute S316, otherwise execute S315;

[0073] S315, assign the value of top+1 to len, and execute S317;

[0074] S316, define the index of the array of the interface number value a in the stack as i, and set the value of the variable pos as i; start from the position i, and execute data[i]=data[i+1] in a loop, the value of i is increased by 1 each time the loop is executed, and the loop ends until the value of i is equal to the value of len, that is, the interface number of the next stack space position is used to replace the interface number of the original stack space position in turn, finally the repeated interface number is moved from the original stack space position to the top position, and the total number of interface numbers in the stack does not change, that is, the value of len is not changed, and execute S317;

[0075] S317, exit the module.

[0076] Further, as shown in Figure 6 , the embodiment provides a multi-interface real-time display method, which includes the following steps:

[0077] S401, the interface real-time display module starts, and S402 is executed;

[0078] S402, the interface switching function show_page obtains the interface number located at the top of the stack at the moment, and the corresponding interface display function is called according to the obtained interface number, and S403 is executed;

[0079] S403, the interface switching function show_page is called in the main function, and S404 is executed;

[0080] S404, the module is exited.

[0081] The above multi-interface switching implementation method needs to be realized through a field operation panel, as shown in the accompanying drawings, which comprises an embedded microprocessor, a power module, a liquid crystal display module, a key module and a communication module. Figure 7

[0082] The power module is connected with the liquid crystal display module and the embedded microprocessor respectively.

[0083] The embedded microprocessor is connected with the liquid crystal display module, the key module and the communication module through a liquid crystal display driving circuit, a GPIO port and a communication port respectively.

[0084] Further, the embedded microprocessor is internally provided with an empty stack, as shown in the accompanying drawings, the stack structure body of the empty stack comprises a top position top, a stack space size stacksize, a stack data element array data and a current stack element quantity len. Figure 8

[0085] In summary, the embodiment uses a simple method, combines the stack data structure, uses the last-in first-out feature of the stack, the interface switching behavior is predictable, the user can easily know how to "back up" to the previous interface and how to "enter" the target interface, the multi-interface switching is realized, and the program complexity is reduced.

[0086] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same or similar parts between the embodiments can be referred to each other.

[0087] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.​​

Claims

1. A stack-based on-site operation panel multi-interface switching implementation method, characterized in that: The following steps are involved: Number the display functions corresponding to each interface of the on-site operation panel; Construct an empty stack and store the numbers corresponding to the display functions of each interface in the empty stack; When entering a target interface, the number corresponding to the display function of the target interface is pushed into the stack, and whether the number exists in the stack is judged and processed; Place the number corresponding to the display function of the target interface at the top of the stack, call the display function corresponding to the interface number at the top of the stack, and complete the interface switching.

2. A stack-based on-site operation panel multi-interface switching implementation method according to claim 1, characterized in that: The display functions corresponding to each interface of the on-site operation panel are numbered, specifically: One interface of the on-site operation panel corresponds to one display function. Each interface is represented by n identifiers, and the n identifiers are defined as n constants using macro definitions, resulting in n interface numbers 1 to n.

3. The stack-based on-site operation panel multi-interface switching implementation method according to claim 1, characterized in that: When constructing an empty stack, define the top of the stack as top, the stack space size as stacksize, the stack data element array as data, and the current number of stack elements as len.

4. A stack-based on-site operation panel multi-interface switching implementation method according to claim 3, characterized in that: When entering a target interface, the number corresponding to the display function of the target interface is pushed into the stack, which specifically includes the following steps: Determine whether the current number of stack elements, len, is less than the stack space size, stacksize. If so, push the elements onto the stack; otherwise, return 0 and push fails. Push the number corresponding to the display function of the target interface into the stack so that the number is at the top of the stack, and increase the value of the top position of the stack by 1.

5. The stack-based on-site operation panel multi-interface switching implementation method according to claim 3, characterized in that: The judgment and processing of whether the number exists in the stack specifically includes the following steps: Define the variable pos to store the position of the top element of the original stack, that is, assign the top value to pos; Traverse and search all the interface numbers in the stack. If the interface number value a in the stack is the same as the interface number value of the newly pushed interface, define the index of the array of interface number value a in the stack as i, and set the value of variable pos to i; Starting from position i, the loop executes data[i]=data[i+1], and the value of i is increased by 1 each time the loop is repeated until the value of i is equal to the value of len, and the loop ends. That is, the interface number of the original stack space position is replaced by the interface number of the next stack space position in turn, and finally the repeated interface number is moved from the original stack space position to the top of the stack, and the total number of interface numbers in the stack remains unchanged, that is, the value of len is not changed; If there is no duplicate interface number, assign the value of top+1 to len.

6. The stack-based on-site operation panel multi-interface switching implementation method according to claim 1, characterized in that: When the interface switches, the interface number at the top of the stack is obtained through the interface switching function show_page at all times, and the corresponding interface display function is called according to the obtained interface number; the interface switching function show_page is called cyclically in the main function, and multiple interfaces are displayed in real time.

7. A field operation panel, used to implement the stack-based field operation panel multi-interface switching implementation method according to any one of claims 1 to 6, characterized in that: include: Embedded microprocessor, power module, LCD module, key module and communication module; The power module is connected to the liquid crystal display module and the embedded microprocessor respectively; The embedded microprocessor is connected to the liquid crystal display module, the key module and the communication module respectively through the liquid crystal display driving circuit, the GPIO port and the communication port.

8. The on-site operation panel according to claim 7, characterized in that: An empty stack is set inside the embedded microprocessor. The stack structure of the empty stack includes: the stack top position top, the stack space size stacksize, the stack data element array data, and the current stack element number len.

Citation Information

Patent Citations

  • Interface switching method and device and electronic equipment

    CN111399742A

  • Interface switching method and device

    CN112416482B

  • Interface display method and electronic equipment

    CN117827070A

  • Interface switching method and device and electronic equipment

    CN117827348A

  • Method and device for obtaining function calling relation, electronic equipment and storage medium

    CN116360781A