Control feedback method and device of application system, electronic equipment and storage medium
By using control feedback methods on both the web and server sides to verify the compliance of control requests and record processing logs, the reliability issues of the B/S architecture are resolved, the system's security and reliability are improved, and maintenance and management are simplified.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TIANDI CHANGZHOU AUTOMATION
- Filing Date
- 2023-01-12
- Publication Date
- 2026-05-15
AI Technical Summary
Application systems based on the B/S architecture suffer from insufficient reliability, weak security, high difficulty in system maintenance and management, and challenges in data expansion.
The system calls the server-side control interface via the web client, generates a control transaction identifier, and searches for the corresponding record in the control record cache. If the record exists, the control transaction is executed; otherwise, a failure is reported. The server records processing logs and verifies the compliance of control requests, processing them only when they are compliant.
It improves the control reliability and security of the application system, simplifies system maintenance and management, and allows for quick identification of problems.
Smart Images

Figure CN116208670B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data interaction technology, and in particular to a control feedback method, device, electronic device, and storage medium for an application system. Background Technology
[0002] With the continuous development of the Internet, computer networks have become an indispensable part of people's work and life. As user needs increase daily, network software is also increasing. Integrating various programs written in different languages and running on different platforms to achieve inter-software communication has become a common need.
[0003] Smart mines are based on the digitalization and informatization of mines. They proactively sense, automatically analyze, and rapidly process information related to mine production, occupational health and safety, technical support, and logistical support. The ultimate goal of building smart mines is to achieve safe, unmanned, efficient, and clean mines. To adapt to the informatization and intelligentization of mines, various monitoring systems are currently in place, and all monitoring data can be aggregated into a data platform.
[0004] Existing data platforms primarily rely on the C / S (Client / Server) architecture. While technically mature, the C / S structure is characterized by strong interactivity, secure access, fast response times, and suitability for handling large amounts of data. However, it lacks versatility; system maintenance and upgrades require redesign and development, increasing maintenance and management complexity, and further data expansion is difficult. Therefore, the C / S structure is limited to small local area networks. The B / S architecture, or browser-server architecture, is a variation or improvement on the C / S architecture that emerged with the rise of Internet technology. In the B / S architecture, the user interface is implemented through a web browser, with a small portion of the transaction logic implemented on the front end (browser), but the main transaction logic is implemented on the server side, forming a so-called three-tier structure. The B / S architecture unifies the client side, centralizing the core functionality of the system on the server, simplifying system development, maintenance, and use.
[0005] Although the B / S architecture makes transaction processing simpler and faster than the C / S architecture, it is built on a wide area network, has relatively weak security control, and faces an unknown user group, thus its security and reliability are relatively weak. Summary of the Invention
[0006] The technical problem to be solved by this invention is: in order to solve the technical problem of insufficient reliability of application systems based on B / S architecture, this invention provides a control feedback method, device, electronic device and storage medium for application systems, which can improve the reliability and security of control.
[0007] The technical solution adopted by this invention to solve its technical problem is: a control feedback method for an application system, comprising the following steps:
[0008] S1. The web client calls the control interface of the server, and the server generates a corresponding control transaction identifier and returns it to the web client.
[0009] S2. The Web client searches for a corresponding control record in the control record cache based on the control transaction identifier. If the control record is found, the Web client controls the server to execute the control transaction based on the found control record. If not, the Web client reports a control failure.
[0010] This can improve the reliability of application system control.
[0011] Furthermore, if the time taken for the web client to query the corresponding control record in the control record cache exceeds the time interval Δt, the query is considered to have failed, and the web client reports a control failure.
[0012] Furthermore, after the server returns a control transaction identifier to the web client, the server adds processing record cache information with the control transaction identifier as the key to its real-time cache; the processing record cache information includes: a control success indicator, an operation record list, and control instructions.
[0013] Furthermore, after receiving the control command from the Web client, the server-side control interface sends the control command to the business layer processing module. The business layer processing module determines whether the current control request is compliant based on the control command. If compliant, the control command is sent to the driver layer processing module; if not compliant, the current control request is updated in the processing record cache information.
[0014] Furthermore, when the driver layer processing module receives the control command, it converts the control command into a format that can be recognized by the device to be controlled or a third-party system, and sends the converted control command to the device to be controlled or the third-party system.
[0015] Furthermore, after receiving the control command, the device to be controlled or the third-party system returns a control result to the server. If the control result is successful, the server updates the control success flag to true and adds a new operation log; if the control result is unsuccessful, the server updates the control success flag to false and adds a new operation log.
[0016] Furthermore, the criteria for determining whether the current control request is compliant are whether the web client that initiated the current control request is trustworthy and whether the user initiating the request has control permissions; when the web client that initiated the current control request is trustworthy and the user initiating the request has control permissions, the current control request is considered compliant.
[0017] The present invention also provides a control feedback device for an application system, employing the aforementioned control feedback method, wherein the control feedback device comprises:
[0018] The system comprises a web client, a server, and a device. The web client is connected to the server, and the server is connected to the device. The web client initiates control requests to the server, the server processes the control requests, and generates corresponding control commands. The device executes the control commands.
[0019] The present invention also provides an electronic device, comprising: a processor and a memory, the memory being used to store executable instructions of the processor; wherein the processor is used to execute the executable instructions to perform the steps of the control feedback method.
[0020] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the control feedback method.
[0021] The beneficial effects of this invention are that the control feedback method, device, electronic device, and storage medium of the application system of this invention, by judging the control requests initiated from the Web client, will only further process the control request if it is compliant. Furthermore, the server records control logs for the entire process of receiving, sending, and processing control commands, facilitating traceability and problem localization. This invention not only improves the security and reliability of control at each stage, but also allows for rapid problem localization if issues arise, facilitating quick resolution. Attached Figure Description
[0022] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0023] Figure 1 This is a flowchart of the control feedback method of the present invention.
[0024] Figure 2 This is a schematic diagram illustrating the interaction between the web client and the server in this invention.
[0025] Figure 3 This is a flowchart of the web-based processing of the present invention.
[0026] Figure 4 This is a flowchart of the server-side processing of the present invention.
[0027] Figure 5 This is a structural block diagram of the control feedback device of the present invention.
[0028] In the diagram: 1. Web client; 2. Server client; 3. Device client. Detailed Implementation
[0029] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0030] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, features defined with "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.
[0031] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0032] like Figures 1 to 4As shown, the control feedback method of the application system of the present invention includes the following steps: S1, the Web client calls the control interface of the server, the server generates a corresponding control transaction identifier and returns it to the Web client. S2, the Web client searches for the existence of a corresponding control record in the control record cache according to the control transaction identifier. If it exists, the Web client controls the server to execute the control item according to the queried control record; if not, the Web client reports a control failure.
[0033] It should be noted that the server-side uses a WebAPI (Application Programming Interface) to expose its interface, supporting concurrent access from multiple clients. The web client can initiate control requests manually or automatically based on business logic. The web client can call the server-side control interface via the WebAPI to send the control request to the server. Upon receiving the control request, the server-side control interface generates a corresponding control transaction identifier and returns it to the web client. After the server returns the control transaction identifier to the web client, it adds processing record cache information with the control transaction identifier as the key to its real-time cache. The processing record cache information includes: a control success / failure indicator, a list of operation records, and control instructions. After receiving the control transaction identifier, the web client searches the server-side control record cache for a corresponding control record. If a corresponding control record exists, it is retrieved, and the server can execute the control action based on that record. If no corresponding control record exists, the control is considered to have failed. It should be noted that if the web client spends more than the time interval Δt searching for a corresponding control record in the control record cache, the query is considered to have failed, and the web client reports a control failure. In other words, the web-based query for the corresponding control record must be completed within a time interval Δt. If the search is not completed or the record cannot be found within Δt, it is considered a control failure. In other words, the control feedback method of this invention verifies the success of control through control transaction identifiers, thereby improving the security and reliability of application system control.
[0034] After receiving a control command from the web client, the server-side control interface sends the command to the business layer processing module. The business layer module determines whether the control request is compliant. If compliant, it sends the command to the driver layer processing module; otherwise, it updates the processing record cache. The compliance criteria are whether the web client initiating the request is trustworthy and whether the user has the necessary permissions. A compliant request is considered compliant only if both the web client and the user have the required permissions. In other words, a compliant request is only considered compliant if both conditions are met simultaneously. Only when the request is compliant will the next step be performed. This allows for the detection of malicious control attempts at the request stage, improving the security and reliability of mine equipment control.
[0035] When the current control request is deemed compliant, the business layer processing module adds a control log. When the driver layer processing module receives a control command, it converts the command into a format recognizable by the device or third-party system to be controlled and sends the converted command to that device or system. Upon receiving the control command, the device or system returns a control result to the server. If the result is successful, the server updates the success flag to true and adds a new operation log; if the result is unsuccessful, the server updates the success flag to false and adds a new operation log. It's important to note that after receiving a control command, the driver layer processing module first identifies the command and adds it to the control log, then encapsulates (i.e., converts the format) the command and adds it to the control log again, finally sending the encapsulated command to the device or system. The device or system can then send the control result back to the server. For example, operations such as the server-side control interface receiving and sending control commands, and the business layer processing module processing the command, are all updated in the processing record cache of the current control transaction identifier for easy traceability. In the control command sending process, this invention records a control log for each step and stores it in the processing record cache. In this way, if a problem occurs, it can be traced back to each step, the source of the problem can be located in time, and the problem can be solved quickly.
[0036] like Figure 5As shown in the figure, the present invention also provides a control feedback device for an application system and a control feedback method adopted. The control feedback device includes: a Web end 1, a server end 2, and a device end 3. The Web end 1 is connected to the server end 2, and the server end 2 is connected to the device end 3. The Web end 1 is used to initiate a control request to the server end 2, and the server end 2 is used to process the control request and generate corresponding control instructions; the device end 3 is used to execute the control instructions. The server end 2 includes an interface layer, a service layer, a communication driver layer, and a data bus. The interface layer is connected to the Web end 1, the service layer is connected to the interface layer, and the interface layer, the service layer, and the communication driver layer are all connected to the data bus. The data bus has functions such as transmitting control instructions, data caching, and data subscription and publication. The communication driver layer is connected to the device end 3 through Ethernet. For example, the Web end 1 can be a mobile phone, the server end 2 can be a data platform, and the device end 3 can be an instrument, a third-party business system, a PLC controller, etc. The data bus can achieve the interaction within the server end 2, and the communication driver layer can achieve the interaction between the server end 2 and the device end 3.
[0037] The present invention also provides an electronic device, including: a processor and a memory. The memory is used to store the executable instructions of the processor; wherein, the processor is used to run the executable instructions to execute the steps of the control feedback method.
[0038] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the steps of the control feedback method.
[0039] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments of the present application can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0040] In summary, for the control feedback method, device, electronic device, and storage medium of the application system of the present invention, by judging the control request initiated by the Web end, only when the control request is compliant, the server end will further process the control request. Moreover, the server end will record control logs for operations such as receiving, sending, and processing control instructions, which is convenient for tracing and locating problems. The present invention can not only improve the security and reliability of control in each link, but also quickly locate which link has problems if there are problems, which is conducive to quickly solving problems.
[0041] Based on the above-described preferred embodiments of the present invention, and through the foregoing description, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined by the scope of the claims.
Claims
1. A control feedback method for an application system, characterized in that, Includes the following steps: S1. The web client calls the control interface of the server, and the server generates a corresponding control transaction identifier and returns it to the web client. S2. The Web client searches for a corresponding control record in the control record cache based on the control transaction identifier. If the control record is found, the Web client controls the server to execute the control transaction based on the queried control record. If not, the web-based feedback control has failed.
2. The control feedback method for the application system as described in claim 1, characterized in that, If the time taken for the web client to query the corresponding control record in the control record cache exceeds the time interval Δt, the query is considered to have failed, and the web client reports a control failure.
3. The control feedback method for the application system as described in claim 1, characterized in that, After the server returns the control transaction identifier to the web client, the server adds processing record cache information with the control transaction identifier as the key to its real-time cache. The processing record cache information includes: a control success indicator, an operation record list, and control instructions.
4. The control feedback method for the application system as described in claim 3, characterized in that, After receiving the control command from the Web client, the server-side control interface sends the control command to the business layer processing module. The business layer processing module determines whether the current control request is compliant based on the control command. If compliant, the control command is sent to the driver layer processing module. If non-compliant, the current control request will be updated in the processing record cache information.
5. The control feedback method for the application system as described in claim 4, characterized in that, When the driver layer processing module receives the control command, it converts the control command into a format that can be recognized by the device to be controlled or a third-party system, and sends the converted control command to the device to be controlled or a third-party system.
6. The control feedback method for the application system as described in claim 5, characterized in that, After receiving the control command, the device to be controlled or the third-party system returns the control result to the server. If the control result is successful, the server updates the control success flag to true and adds a new operation log. If the control result is unsuccessful, the server updates the control success flag to false and adds a new operation log.
7. The control feedback method for the application system as described in claim 4, characterized in that, The criteria for determining whether a current control request is compliant are whether the web client that initiated the current control request is trustworthy and whether the user initiating the request has control privileges; when the web client that initiated the current control request is trustworthy and the user initiating the request has control privileges, the current control request is considered compliant.
8. A control feedback device for an application system, characterized in that, The control feedback method according to any one of claims 1 to 7, wherein the control feedback device comprises: The system comprises a web client (1), a server client (2), and a device client (3). The web client (1) is connected to the server client (2), and the server client (2) is connected to the device client (3). The web client (1) is used to initiate a control request to the server client (2). The server client (2) is used to process the control request and generate corresponding control instructions. The device client (3) is used to execute the control instructions.
9. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store executable instructions of the processor; wherein the processor is used to execute the executable instructions to perform the steps of the control feedback method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the control feedback method as described in any one of claims 1 to 7.