A MES application method and system based on cloud and edge
By implementing data synchronization and update management in the cloud and edge MES systems, the problem of cloud MES systems being overly dependent on the Internet is solved, ensuring that clients can use MES software normally when the network is poor, avoiding the impact on enterprise production.
Patent Information
- Application Number
- CN202210161333.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-22
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2042-02-22
AI Technical Summary
The existing cloud MES systems rely too much on the Internet, which makes it difficult to realize data processing functions in the event of poor networks, affecting enterprise production activities.
The MES application method based on the cloud and edge end is adopted. Through the client, the client logs in and determines whether to configure the edge server, determines whether to enable the edge server based on the configuration, and controls the client to obtain the MES software application through the cloud or edge end, and performs data synchronization communication. Use advanced message queue protocol to achieve data synchronization and update management.
In the case of poor network, the client can switch to the edge server to ensure the normal use of MES software applications and avoid the impact on enterprise production activities.
Smart Images

Figure CN114584540B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial Internet technology, and more specifically to an MES (manufacturing process control system) application method and system based on the cloud and edge. Background Art
[0002] With the growing development of manufacturing enterprises, MES (Manufacturing Execution System) is being applied to production to improve their ability to control the production process and increase production efficiency. MES is primarily responsible for production management and scheduling. It improves the competitiveness of the manufacturing industry by controlling all factory resources (including materials, equipment, personnel, process instructions, and facilities). It also provides a method for systematically integrating quality control, document management, and production scheduling functions on a unified platform. During the production process, MES collects large amounts of real-time data and processes real-time events in a timely manner. At the same time, it maintains two-way communication capabilities with the planning and production control layers, receiving corresponding data from both upper and lower layers and providing feedback on processing results and production instructions.
[0003] With the development of internet technology, cloud technology and MES have been combined to form cloud-based MES systems, which provide corresponding software application services via the Internet. The drawback of existing cloud-based MES systems is their excessive reliance on the Internet. Since all data processing in cloud-based MES systems is performed in the cloud, if the network on which the cloud-based MES system resides does not meet standard requirements, corresponding data processing functions will be difficult to implement, which can easily affect enterprise production activities. Summary of the Invention
[0004] The purpose of the present invention is to provide an MES application method and system based on the cloud and edge to solve one or more technical problems existing in the prior art and at least provide a beneficial option or create conditions.
[0005] The technical solutions adopted to solve the above technical problems are:
[0006] A cloud-based and edge-based MES application method includes the following steps:
[0007] Step 100: The client logs in to the cloud server and determines whether the client is configured with an edge server. If the client is configured with an edge server, the client logs in to the edge server synchronously.
[0008] Step 200: Obtain the cloud server configuration and determine whether to enable the edge server;
[0009] Step 300: If the edge server is enabled, the client is controlled to obtain the MES software application through the edge server; if the edge server is not enabled, the client is controlled to obtain the MES software application through the cloud server;
[0010] Step 400: Control the cloud server and the edge server to perform data synchronization communication.
[0011] As a further improvement of the above technical solution, step 400 includes:
[0012] Step 410: Determine the method by which the client obtains the MES software application. If the client obtains the MES software application through the cloud server, proceed to step 420; if the client obtains the MES software application through the edge server, proceed to step 430.
[0013] Step 420: Determine whether the edge server is normal. If the edge server is normal, the cloud server synchronizes the data to the edge server via the Advanced Message Queuing Protocol.
[0014] In step 430 , the edge server synchronizes the data to the cloud server via the Advanced Message Queuing Protocol.
[0015] As a further improvement of the above technical solution, step 430 also includes testing the amount of database table data reported by the edge server to the cloud server, and comparing it with the amount of database table data received by the cloud server. At the same time, the edge server continuously sends heartbeat messages to the cloud server.
[0016] As a further improvement of the above technical solution, this technical solution also includes:
[0017] Step 500: Set up an update monitoring program for the cloud server. When the update monitoring program detects that there is an update to the MES software application on the cloud server, the cloud server transmits the update instruction to the edge server via the Advanced Message Queuing Protocol. The edge server performs the update operation after receiving the update instruction.
[0018] The present invention also discloses an MES application system based on the cloud and edge, including:
[0019] The login module is used by the client to log in to the cloud server and determine whether the client is configured with an edge server. If the client is configured with an edge server, the client will log in to the edge server synchronously;
[0020] The control module is used to obtain the cloud server configuration and control whether the edge server is enabled or not according to the cloud server configuration;
[0021] The application acquisition module is used to control the client to obtain the MES software application through the edge server when the edge server is enabled, and to control the client to obtain the MES software application through the cloud server when the edge server is disabled;
[0022] The synchronization module is used to control the data synchronization communication between the cloud server and the edge server.
[0023] As a further improvement of the above technical solution, the synchronization module includes:
[0024] A determination unit, configured to determine a method by which the client obtains the MES software application. If the client obtains the MES software application through a cloud server, the first synchronization unit is called; if the client obtains the MES software application through an edge server, the second synchronization unit is called;
[0025] A first synchronization unit is used to control the cloud server to synchronize data to the edge server through the Advanced Message Queuing Protocol when the edge server is normal;
[0026] The second synchronization unit is used to control the edge server to synchronize data to the cloud server through the Advanced Message Queuing Protocol.
[0027] As a further improvement of the above technical solution, the second synchronization unit is also used to test the amount of database table data reported by the edge server to the cloud server, and compare it with the amount of database table data received by the cloud server. At the same time, the edge server is controlled to continuously send heartbeat messages to the cloud server.
[0028] As a further improvement of the above technical solution, this technical solution also includes:
[0029] The update module is used to set up an update monitoring program for the cloud server. When the update monitoring program monitors that there is an update to the MES software application on the cloud server, it controls the cloud server to transmit the update instruction to the edge server through the Advanced Message Queuing Protocol, and controls the edge server to perform the update operation after receiving the update instruction.
[0030] The beneficial effect of the present invention is as follows: this technical solution obtains the cloud server configuration and controls whether the edge server is enabled or not according to the cloud server configuration. The client then chooses whether to obtain the MES software application through the cloud server or the edge server. Finally, the cloud server and the edge server need to synchronize data transmission. This technical solution effectively solves the problem of excessive dependence of the client on the Internet. The client can switch between the cloud server and the edge server, ensuring that the client can use the MES software application normally in the case of poor network, thereby avoiding affecting the company's production activities. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The present invention will be further described below with reference to the accompanying drawings and embodiments;
[0032] Figure 1 It is a schematic flow diagram of the present invention. DETAILED DESCRIPTION
[0033] This section will describe in detail the specific embodiments of the present invention. The preferred embodiments of the present invention are shown in the accompanying drawings. The purpose of the accompanying drawings is to supplement the description of the text part of the specification with graphics, so that people can intuitively and vividly understand each technical feature and the overall technical solution of the present invention, but they should not be understood as limiting the scope of protection of the present invention.
[0034] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, they cannot be understood as limitations on the present invention.
[0035] In the description of the present invention, if there are words such as "several", it means one or more, and "more" means more than two. Greater than, less than, and exceed are understood as not including the number itself, and above, below, and within are understood as including the number itself.
[0036] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, and connecting should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0037] Reference Figure 1 This application discloses an MES application method based on the cloud and edge. The first embodiment thereof includes the following steps:
[0038] Step 100: The client logs in to the cloud server and determines whether the client is configured with an edge server. If the client is configured with an edge server, the client logs in to the edge server synchronously.
[0039] Step 200: Obtain the cloud server configuration and determine whether to enable the edge server;
[0040] Step 300: If the edge server is enabled, the client is controlled to obtain the MES software application through the edge server; if the edge server is not enabled, the client is controlled to obtain the MES software application through the cloud server;
[0041] Step 400: Control the cloud server and the edge server to perform data synchronization communication.
[0042] In the actual application of this embodiment, it is first necessary to configure the client and login account password and other information for the user. At the same time, it is necessary to choose whether to configure the edge service according to the user's actual needs. This embodiment is only applicable to the case where the user has configured the edge service.
[0043] This embodiment obtains the cloud server configuration and controls whether the edge server is enabled or not based on the cloud server configuration. The client then chooses whether to obtain the MES software application through the cloud server or the edge server. Regardless of the specific method used by the client to obtain the MES software application, the cloud server and the edge server need to synchronize data transmission. This technical solution effectively solves the problem of the client's excessive dependence on the Internet. The client can switch between the cloud server and the edge server, ensuring that the client can use the MES software application normally in the case of poor network, thereby avoiding affecting the company's production activities.
[0044] As a further preferred embodiment, in this embodiment, regardless of whether the client chooses to obtain the MES software application through the cloud server or the edge server, data synchronization is required between the cloud server and the edge server to ensure that the client can obtain the MES software application without distinction. In this embodiment, step 400 includes:
[0045] Step 410: Determine the method by which the client obtains the MES software application. If the client obtains the MES software application through the cloud server, proceed to step 420; if the client obtains the MES software application through the edge server, proceed to step 430.
[0046] Step 420: Determine whether the edge server is normal. If the edge server is normal, the cloud server synchronizes the data to the edge server via the Advanced Message Queuing Protocol.
[0047] In step 430 , the edge server synchronizes the data to the cloud server via the Advanced Message Queuing Protocol.
[0048] In this embodiment, the data synchronization process optimizes the various data models of the system and uses aspect programming to track data model change methods, so as to sense data changes at any time. Once a change occurs, it is pushed through the Advanced Message Queue Protocol and then synchronized in sequence. Whether it is synchronizing cloud server data to edge servers or edge server data to cloud servers, the same method is used. When the network is interrupted or the quality is poor, resulting in delayed message consumption and message retention, the Advanced Message Queue will temporarily store the messages until the network connection is normal and then synchronize them one by one. During the synchronization process, message consumption uses a multiple confirmation method. Only after the synchronization is successful will the data be cleared from the Advanced Message Queue, ensuring that data is not lost and realizing data caching and uploading. Cloud services can synchronize on-site production data more timely.
[0049] Further as a preferred implementation, step 430 described in this embodiment also includes testing the amount of database table data reported by the edge server to the cloud server, and comparing it with the amount of database table data received by the cloud server. At the same time, the edge server continuously sends heartbeat messages to the cloud server.
[0050] In this embodiment, different usage permissions can also be configured for different users. After the user logs in to the client, when the user chooses to enable high-privilege functions through the client, the edge server needs to receive instructions sent by the cloud server through the advanced message queue, so that the edge server can make corresponding adjustments to the corresponding MES software application.
[0051] As a further preferred embodiment, this embodiment also includes:
[0052] Step 500: Set up an update monitoring program for the cloud server. When the update monitoring program detects that there is an update to the MES software application on the cloud server, the cloud server transmits the update instruction to the edge server via the Advanced Message Queuing Protocol. The edge server performs the update operation after receiving the update instruction.
[0053] This application also discloses an MES application system based on the cloud and edge. The first embodiment thereof includes:
[0054] The login module is used by the client to log in to the cloud server and determine whether the client is configured with an edge server. If the client is configured with an edge server, the client will log in to the edge server synchronously;
[0055] The control module is used to obtain the cloud server configuration and control whether the edge server is enabled or not according to the cloud server configuration;
[0056] The application acquisition module is used to control the client to obtain the MES software application through the edge server when the edge server is enabled, and to control the client to obtain the MES software application through the cloud server when the edge server is disabled;
[0057] The synchronization module is used to control the data synchronization communication between the cloud server and the edge server.
[0058] As a further preferred implementation, in this embodiment, the synchronization module includes:
[0059] A determination unit, configured to determine a method by which the client obtains the MES software application. If the client obtains the MES software application through a cloud server, the first synchronization unit is called; if the client obtains the MES software application through an edge server, the second synchronization unit is called;
[0060] A first synchronization unit is used to control the cloud server to synchronize data to the edge server through the Advanced Message Queuing Protocol when the edge server is normal;
[0061] The second synchronization unit is used to control the edge server to synchronize data to the cloud server through the Advanced Message Queuing Protocol.
[0062] Further as a preferred implementation, in this embodiment, the second synchronization unit is also used to test the amount of database table data reported by the edge server to the cloud server, and compare it with the amount of database table data received by the cloud server. At the same time, the edge server is controlled to continuously send heartbeat messages to the cloud server.
[0063] As a further preferred embodiment, this embodiment also includes:
[0064] The update module is used to set up an update monitoring program for the cloud server. When the update monitoring program monitors that there is an update to the MES software application on the cloud server, it controls the cloud server to transmit the update instruction to the edge server through the Advanced Message Queuing Protocol, and controls the edge server to perform the update operation after receiving the update instruction.
[0065] The above specifically describes the preferred embodiments of the present invention, but the invention is not limited to the embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A MES application method based on cloud and edge, characterized by: The following steps are involved: Step 100, the client logs in to the cloud server and determines whether the client is configured with an edge server. If the client is configured with an edge server, the client logs in to the edge server synchronously; Step 200, obtaining the cloud server configuration and determining whether to enable the edge server; Step 300: If the edge server is enabled, the client is controlled to obtain the MES software application through the edge server; if the edge server is not enabled, the client is controlled to obtain the MES software application through the cloud server; Step 400, controlling the cloud server and the edge server to perform data synchronization communication; The step 400 includes: Step 410, determining the way in which the client obtains the MES software application. If the client obtains the MES software application through the cloud server, execute step 420; if the client obtains the MES software application through the edge server, execute step 430; Step 420, determining whether the edge server is normal, if the edge server is normal, the cloud server synchronizes the data to the edge server through the Advanced Message Queuing Protocol; In step 430, the edge server synchronizes the data to the cloud server via the Advanced Message Queuing Protocol.
2. According to claim 1, a MES application method based on cloud and edge terminals is characterized in that: Step 430 also includes testing the amount of database table data reported by the edge server to the cloud server, and comparing it with the amount of database table data received by the cloud server. At the same time, the edge server continuously sends heartbeat messages to the cloud server.
3. The MES application method based on the cloud and edge according to claim 1, characterized in that: Also includes: Step 500, set an update monitoring program for the cloud server. When the update monitoring program monitors that there is an update of the MES software application on the cloud server, the cloud server transmits the update instruction to the edge server through the Advanced Message Queuing Protocol. After receiving the update instruction, the edge server performs an update operation.
4. A MES application system based on the cloud and edge, characterized by: include: The login module is used for the client to log in to the cloud server and determine whether the client is configured with an edge server. If the client is configured with an edge server, the client will log in to the edge server synchronously. The control module is used to obtain the cloud server configuration and control whether the edge server is enabled or not according to the cloud server configuration; The application acquisition module is used to control the client to obtain the MES software application through the edge server when the edge server is enabled, and to control the client to obtain the MES software application through the cloud server when the edge server is disabled; The synchronization module is used to control the data synchronization communication between the cloud server and the edge server; The synchronization module comprises: A determination unit, used to determine a way for the client to obtain the MES software application. If the client obtains the MES software application through a cloud server, the first synchronization unit is called; if the client obtains the MES software application through an edge server, the second synchronization unit is called; A first synchronization unit, used for controlling the cloud server to synchronize data to the edge server through the Advanced Message Queuing Protocol when the edge server is normal; The second synchronization unit is used to control the edge server to synchronize data to the cloud server through the Advanced Message Queuing Protocol.
5. The MES application system based on the cloud and edge according to claim 4 is characterized in that: The second synchronization unit is also used to test the amount of database table data reported by the edge server to the cloud server, compare it with the amount of database table data received by the cloud server, and at the same time, control the edge server to continuously send heartbeat messages to the cloud server.
6. The MES application system based on the cloud and edge according to claim 4, characterized in that: Also includes: The update module is used to set up an update monitoring program for the cloud server. When the update monitoring program monitors that there is an update to the MES software application on the cloud server, it controls the cloud server to transmit the update instruction to the edge server through the Advanced Message Queuing Protocol, and controls the edge server to perform the update operation after receiving the update instruction.
