CN114116730B - Interface management method, device, equipment and storage medium - Google Patents

Interface management method, device, equipment and storage medium Download PDF

Info

Publication number
CN114116730B
CN114116730B CN202210069551.8A CN202210069551A CN114116730B CN 114116730 B CN114116730 B CN 114116730B CN 202210069551 A CN202210069551 A CN 202210069551A CN 114116730 B CN114116730 B CN 114116730B
Authority
CN
China
Prior art keywords
interface
target
result
request message
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210069551.8A
Other languages
Chinese (zh)
Other versions
CN114116730A (en
Inventor
金海龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Saimeite Information Technology Co.,Ltd.
Original Assignee
Shenzhen Weixun Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Weixun Information Technology Co ltd filed Critical Shenzhen Weixun Information Technology Co ltd
Priority to CN202210069551.8A priority Critical patent/CN114116730B/en
Publication of CN114116730A publication Critical patent/CN114116730A/en
Application granted granted Critical
Publication of CN114116730B publication Critical patent/CN114116730B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides an interface management method, an interface management device, equipment and a storage medium, wherein the interface management method comprises the following steps: after receiving a request message which is sent by a target system and carries an interface label, determining at least one candidate interface information containing a uniform resource locator in a plurality of interface information prestored in a manufacturing execution system according to the uniform resource locator of the request message; determining target interface information containing the interface tag in the at least one candidate interface information; according to the logic instruction obtained from the target interface information, executing the operation indicated by the logic instruction on the request message to obtain an execution result; by the method, the workload of developers is reduced.

Description

Interface management method, device, equipment and storage medium
Technical Field
The present invention relates to the field of Manufacturing Execution Systems (MES), and in particular, to a method, an apparatus, a device, and a storage medium for interface management.
Background
The manufacturing execution system is a set of production informatization management system facing to a workshop execution layer of a manufacturing enterprise, and can perform collaborative management of management modules including manufacturing data management, planning and scheduling management, production scheduling management, inventory management, quality management, human resource management, equipment management, tool and tool management, purchasing management, cost management, project bulletin board management and the like; thus, the manufacturing execution system is required to establish connections and data interaction with a plurality of production site control systems.
For the current manufacturing execution system, in order to enable the production site control system to transmit the service data to the manufacturing execution system, a developer needs to define an interface used for transmitting the data when the production site control system transmits the data, that is,: defining the interface attribute of the interface and the execution logic of the data transmitted by the interface; each time data transmission is performed, a developer is required to perform interface definition once, and as the number of the production field control systems increases and the number of times of data transmission performed by each production field control system increases, the number of times of interface definition performed by the developer increases, which causes a large workload of the developer.
Disclosure of Invention
In view of this, embodiments of the present application provide an interface management method, apparatus, device, and storage medium to reduce workload of developers.
Mainly comprises the following aspects:
in a first aspect, an embodiment of the present application provides an interface management method, including:
after receiving a request message which is sent by a target system and carries an interface label, determining at least one candidate interface information containing a uniform resource locator in a plurality of interface information prestored in a manufacturing execution system according to the uniform resource locator of the request message; wherein the target system is a system connected to the manufacturing execution system;
determining target interface information containing the interface tag in the at least one candidate interface information;
and executing the operation indicated by the logic instruction on the request message according to the logic instruction acquired from the target interface information to obtain an execution result.
Optionally, after receiving a request packet carrying an interface tag sent by a target system, the interface management method further includes:
creating a log table and setting a unique identifier for the log table;
writing first target data into the log table; wherein the first target data at least comprises: the unique identifier is used for identifying the unique identifier, the request message, a first time point for receiving the request message, a first result for indicating success or failure of receiving the request message, a result message, a second time point for sending the result message to the target system and a second result for indicating success or failure of sending the result message; wherein the interface ID is an interface ID included in the target interface information, and the result message is: and the manufacturing execution system sends a message containing the execution result to the target system through a target interface corresponding to the target interface information.
Optionally, after the unique identifier is set for the log table, the interface management method further includes:
compressing the request message to obtain a first compressed message; compressing the result message to obtain a second compressed message;
writing second target data into the log table; wherein the second target data at least comprises: an interface ID, the unique identifier, the first compact packet, the first time point, the first result, the second compact packet, the second time point, and the second result.
Optionally, the performing, on the request packet, the operation indicated by the logic instruction includes:
analyzing the request message to obtain an analysis result;
writing the analysis result into an intermediate table, and writing the obtained unique identifier of the log table into the intermediate table;
and writing the analysis result and the unique identifier into a service table, and writing a third result for indicating success or failure of writing into the service table into the intermediate table.
Optionally, the interface management method further includes:
after receiving a query request sent by a user, determining a target intermediate table according to a service identifier carried by the query request, wherein the target intermediate table stores a target request message, and the target request message comprises the service identifier;
determining a target log table corresponding to the target unique identifier according to the target unique identifier stored in the target intermediate table;
and displaying the target intermediate table and the target log table.
In a second aspect, an embodiment of the present application provides an interface management apparatus, including:
the system comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for determining at least one candidate interface information containing a uniform resource locator in a plurality of interface information prestored in a manufacturing execution system according to the uniform resource locator of a request message after receiving the request message which is sent by a target system and carries an interface label; wherein the target system is a system connected to the manufacturing execution system;
a second determining module, configured to determine, in the at least one candidate interface information, target interface information including the interface tag;
and the execution module is used for executing the operation indicated by the logic instruction on the request message according to the logic instruction acquired from the target interface information to obtain an execution result.
Optionally, the interface management apparatus further includes:
the system comprises a creating module, a sending module and a receiving module, wherein the creating module is used for creating a log table after receiving a request message which is sent by a target system and carries an interface label, and setting a unique identifier for the log table;
the first writing module is used for writing first target data into the log table; wherein the first target data at least comprises: the unique identifier is used for identifying the unique identifier, the request message, a first time point for receiving the request message, a first result for indicating success or failure of receiving the request message, a result message, a second time point for sending the result message to the target system and a second result for indicating success or failure of sending the result message; wherein the interface ID is an interface ID included in the target interface information, and the result message is: and the manufacturing execution system sends a message containing the execution result to the target system through a target interface corresponding to the target interface information.
Optionally, after the creating module is configured to set a unique identifier for the log table, the interface management apparatus further includes:
the compression module is used for compressing the request message to obtain a first compressed message; compressing the result message to obtain a second compressed message;
the second writing module is used for writing second target data into the log table; wherein the second target data at least comprises: an interface ID, the unique identifier, the first compact packet, the first time point, the first result, the second compact packet, the second time point, and the second result.
Optionally, when the execution module is configured to execute the operation indicated by the logic instruction on the request packet, the execution module is specifically configured to:
analyzing the request message to obtain an analysis result;
writing the analysis result into an intermediate table, and writing the obtained unique identifier of the log table into the intermediate table;
and writing the analysis result and the unique identifier into a service table, and writing a third result for indicating success or failure of writing into the service table into the intermediate table.
Optionally, the interface management apparatus further includes:
a third determining module, configured to determine a target intermediate table according to a service identifier carried in an inquiry request after receiving the inquiry request sent by a user, where the target intermediate table stores a target request packet, and the target request packet includes the service identifier;
the fourth determining module is used for determining a target log table corresponding to the target unique identifier according to the target unique identifier stored in the target intermediate table;
and the display module is used for displaying the target intermediate table and the target log table.
In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the interface management method according to any one of the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the interface management method according to any one of the first aspects.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
in the interface management method provided in the embodiment of the present application, a plurality of interfaces are predefined in a manufacturing execution system, that is: the method comprises the following steps of predefining interface information of a plurality of interfaces, wherein each interface information comprises information such as a uniform resource locator, an interface label, a logic instruction and the like, when a target system (namely a production field control system) sends a request message (namely business data) to a manufacturing execution system, only the uniform resource locator and the interface label of a required interface need to be sent to the manufacturing execution system, and the manufacturing execution system can determine the target interface information in the stored plurality of interface information according to the uniform resource locator and the interface label, namely: after determining the target interface information, the interface information of the required interface directly executes the operation indicated by the logic instruction to the received request message according to the logic instruction (namely, execution logic) included in the target interface information; in the process, the developer only needs to input the uniform resource locator and the interface label of the required interface during each data transmission, and does not need to define the execution logic and other information of the interface, so that the method is favorable for reducing the workload of the developer.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a flowchart illustrating an interface management method according to an embodiment of the present application;
FIG. 2 is a flow chart of another interface management method provided in an embodiment of the present application;
fig. 3 is a schematic structural diagram illustrating an interface management apparatus according to a second embodiment of the present application;
fig. 4 shows a schematic structural diagram of a computer device provided in a third embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides an interface management method, an interface management device, interface management equipment and a storage medium, which are described in the following through embodiments.
Example one
Fig. 1 is a flowchart illustrating an interface management method provided in a first embodiment of the present application, and as shown in fig. 1, the interface management method is applied to a semiconductor manufacturing execution system, and the interface management method can be implemented by the following steps S101 to S103:
step S101: after receiving a request message which is sent by a target system and carries an interface label, determining at least one candidate interface information containing a uniform resource locator in a plurality of interface information prestored in a manufacturing execution system according to the uniform resource locator of the request message; wherein the target system is a system connected to the manufacturing execution system.
Step S102: and determining target interface information containing the interface tag in the at least one candidate interface information.
Specifically, there is at least one production management system (i.e. production site control system) connected to the manufacturing execution system, and each production management system can perform data transmission with the manufacturing execution system, for example: enterprise Resource Planning (ERP) system, Employee Assistance Planning (EAP) system, and Product Data Management (PDM) system; the target system may be any one of the production management systems described above; the method comprises the following steps that a developer defines a plurality of interfaces in a manufacturing execution system in advance, each interface corresponds to interface information, and the interface information of each interface comprises the following steps: the interface ID (unique identifier) of the interface, a Uniform Resource Locator (URL) of the interface, an interface tag, an interface type, a logic instruction, interface description information, an identifier indicating whether to start a log record, a system for performing data interaction with the manufacturing execution system through the interface, and an address (e.g., a mailbox address) for receiving feedback information sent by the manufacturing execution system, where the logic instruction is used to indicate processing performed on data received through the interface, the log record is used to record processing performed on data received through the interface, and the interface type includes uploading and downloading.
It should be noted that the target system generally sends the service data to the manufacturing execution system through the interface whose interface type is downloading, and the manufacturing execution system generally sends the service data to the target system through the interface whose interface type is uploading.
It should be noted again that, when the target system sends the service data to the manufacturing execution system, data interaction is performed with the manufacturing execution system through a WebService RESTful (repeatable State Transfer) communication mode or a WebService Soap (Simple Object Access Protocol) communication mode, and the target developer may use the note @ RequestMapping of Spring boot (sperprobert) to input the uniform resource locator and the interface tag in the path.
It should be noted again that different interfaces defined in the manufacturing execution system are interfaces for transmitting different data; the interface tag is an interface tag (label) for indicating a specific function of the interface, for example, if the interface tag is an order, the interface is an interface for receiving order information sent by the target system, and if the interface tag is a user, the interface is an interface for receiving user information sent by the target system.
It should be noted that, if the target interface information corresponding to the uniform resource locator and the interface tag does not exist in the execution system, a prompt message indicating that the interface information matching fails is sent to the target system.
In specific implementation, the target system can determine, according to the uniform resource locator and the interface tag, to which interface of the manufacturing execution system a message needs to be sent (it is required to say that the interface type of the interface is downloading), and send a request message to the interface, after receiving the request message, the manufacturing execution system obtains the uniform resource locator of the request message, and determines at least one candidate interface information from the stored plurality of interface information according to the uniform resource locator, for each candidate interface information in the at least one candidate interface information, the uniform resource locator included in the candidate interface information is the same as the uniform resource locator of the request message, and after determining the at least one candidate interface information, determines the target interface information in each candidate interface information by using the interface tag carried in the request message, wherein, the interface label included in the target interface information is the same as the interface label carried by the request message; it should be noted that, when only one candidate interface information is determined by using the uniform resource locator of the request packet, if the interface tag included in the candidate interface information is the same as the interface tag carried in the request packet, the candidate interface information is the target interface information.
Step S103: and executing the operation indicated by the logic instruction on the request message according to the logic instruction acquired from the target interface information to obtain an execution result.
Specifically, since the request message is received by the manufacturing execution system through the target interface corresponding to the target interface information, the logic instruction in the target interface information is used to indicate that an operation needs to be performed on the request message, and the execution result is result data obtained after the operation is performed on the request message.
It should be noted that the logic instruction refers to a logic Bean (conventional mode) edited by a user according to a preset interface (a keyword for interface operation in an object-oriented programming language); to standardize the interfaces in the MES, the user can edit the logical Bean time of each interface according to a uniform interface.
It should be noted that the operation performed on the request packet may be set according to an actual situation, for example, the operation performed on the request packet is to acquire required data according to the request packet, and in this case, the acquired execution result is the acquired required data; for another example, the operation performed on the request message is to store the request message, and in this case, the obtained execution result is a result used for indicating that the storage is successful or failed.
In specific implementation, after determining the target interface information, the manufacturing execution system obtains the logic instruction included in the target interface information, and executes the operation indicated by the logic instruction on the request message according to the logic instruction to obtain an execution result.
The interface management method provided in fig. 1 defines several interfaces in advance in the manufacturing execution system, that is: the method comprises the following steps of predefining interface information of a plurality of interfaces, wherein each interface information comprises information such as a uniform resource locator, an interface label, a logic instruction and the like, when a target system (namely a production field control system) sends a request message (namely business data) to a manufacturing execution system, only the uniform resource locator and the interface label of a required interface need to be sent to the manufacturing execution system, and the manufacturing execution system can determine the target interface information in the stored plurality of interface information according to the uniform resource locator and the interface label, namely: after determining the target interface information, the interface information of the required interface directly executes the operation indicated by the logic instruction to the received request message according to the logic instruction (namely, execution logic) included in the target interface information; in the process, the developer only needs to input the uniform resource locator and the interface label of the required interface during each data transmission, and does not need to define the execution logic and other information of the interface, so that the method is favorable for reducing the workload of the developer.
In another possible embodiment, the manufacturing execution system may also send a message containing business data (e.g., order data) to the target system via an interface whose interface type is upload, in which case the manufacturing execution system may determine the interface on the manufacturing execution system that sent the message based on the interface ID.
In a possible implementation, after receiving a request packet carrying an interface tag sent by a target system, the interface management method may further be implemented by the following steps S201 and S202:
step S201: and creating a log table and setting a unique identifier for the log table.
Step S202: writing first target data into the log table; wherein the first target data at least comprises: the unique identifier is used for identifying the unique identifier, the request message, a first time point for receiving the request message, a first result for indicating success or failure of receiving the request message, a result message, a second time point for sending the result message to the target system and a second result for indicating success or failure of sending the result message; wherein the interface ID is an interface ID included in the target interface information, and the result message is: and the manufacturing execution system sends a message containing the execution result to the target system through a target interface corresponding to the target interface information.
Specifically, in order to facilitate a user to trace back the process of executing the operation on the request message, after the request message is received, a log table is created, a unique identifier for identifying the log table is set for the log table, the unique identifier is written into the log table to obtain the log table containing the unique identifier, in order to associate the log table with an interface for receiving the request message, an interface ID included in target interface information and used for identifying a target interface for receiving the request message is also written into the log table, and in order to associate the log table with the request message, the request message is also written into the log table; in addition, when the manufacturing execution system receives the request message, the receiving is successful, and the receiving is failed; after receiving the request message, the manufacturing execution system needs to execute the operation on the request message and then sends an execution result to a target system, and the manufacturing execution system sends a result message containing the execution result to the target system through the target interface; when the result message is sent to the target system, the successful sending condition and the failed sending condition are also stored, and in order to improve the integrity of the recorded process of executing the operation on the request message, the first time point for receiving the request message is used for representing the first result of successful receiving of the request message or failed receiving of the request message, the result message sent to the target system, the second time point for sending the result message to the target system, the second result for representing successful sending of the result message to the target system or failed sending of the result message, and the time period formed by the first time point and the second time point are all written into the log table.
It should be noted that the time for writing the first target data into the log table may be set according to an actual situation, for example, the first target data may be uniformly written after the result message is sent; or after the manufacturing execution system executes each operation, writing the first target data corresponding to the operation into the log table; such as: after the request message is successfully received, the request message, the first time point of receiving the request message, and a result indicating that the request message is successfully received are written into the log table, and the time for writing each first target data into the log table is not specifically limited herein.
In another possible embodiment, before performing the above step S201 and the above step S202, the interface management method may further be implemented by:
after the target interface information is determined, an identifier for indicating whether to start logging is determined in the target interface information, and if the identifier is determined to be the identifier for indicating the indicator to start logging, the above step S201 and the above step S202 are executed.
In another possible embodiment, when the manufacturing execution system sends an upload message including the service data to the target system through an upload interface whose interface type is upload, an upload log table including the unique identifier may also be created, and third target data is written in the upload log table, where the third target data at least includes: the method comprises the steps of obtaining an interface ID of an uploading interface, a unique identification of an uploading log table, an uploading message, a time point of sending the uploading message, a result used for indicating success or failure of sending the uploading message, a result message corresponding to the uploading message and returned by a target system and received by the uploading interface, a time point of receiving the result message corresponding to the uploading message and a result used for indicating success or failure of receiving the result message corresponding to the uploading message.
In a possible embodiment, after executing step S201, the interface management method may further be implemented by the following steps S301 and S302:
step S301: compressing the request message to obtain a first compressed message; and compressing the result message to obtain a second compressed message.
Step S302: writing second target data into the log table; wherein the second target data at least comprises: an interface ID, the unique identifier, the first compact packet, the first time point, the first result, the second compact packet, the second time point, and the second result.
Specifically, the request message includes service data, occupies a large storage space, and the log table is stored in the manufacturing execution system, so that in order to save the storage space of the manufacturing execution system, before the request message is written into the log table, the request message is compressed to obtain a first compressed message occupying a small storage space, and after the first compressed message is obtained, the first compressed message is written into the log table; as above, the obtained result message may also include service data, so before writing the result message into the log table, the result message also needs to be compressed into a second compressed message, and the second compressed message is written into the log table; meanwhile, in order to improve the integrity of the recorded process of performing an operation on the request packet, the interface ID, the unique identifier, the first time point, the first result, the time period, the second time point, and the second result also need to be written into a log table.
In another possible embodiment, when the manufacturing execution system sends an upload message including service data to the target system through an upload interface whose interface type is upload, the upload message and a result message corresponding to the upload message are compressed and written into the upload log table, which is described with reference to the description of step S301 and step S302 above, and details are not repeated here.
In a possible implementation, fig. 2 shows a flowchart of another interface management method provided in an embodiment of the present application, and as shown in fig. 2, the operation indicated by the logic instruction executed on the request packet in step S103 may be implemented by steps S401 to S403 as follows:
step S401: and analyzing the request message to obtain an analysis result.
Step S402: and writing the analysis result into an intermediate table, and writing the acquired unique identifier of the log table into the intermediate table.
Step S403: and writing the analysis result and the unique identifier into a service table, and writing a third result for indicating success or failure of writing into the service table into the intermediate table.
Specifically, after acquiring the logic instruction included in the target interface information, the manufacturing execution system needs to execute the operation indicated by the logic instruction on the request packet, where the specifically executed operation is: analyzing the request message to obtain an analysis result, wherein the analysis result comprises service data (such as order data) and identification information of a target system sending the request message, writing the analysis result into an intermediate table after the analysis result is obtained, then obtaining a unique identification of a log table recording the request message, writing the unique identification into the intermediate table, and finally writing the analysis result and the unique identification into a service table to persist the analysis result and the unique identification; when the analysis result and the unique identifier are written into the service table, the situation of successful writing or the situation of failed writing can occur, so that a third result for indicating the success of writing into the service table or the failure of writing into the service table is determined, and the third result is written into the intermediate table; when the third result is a result indicating that writing into the service table fails, the reason why writing into the service table fails can also be obtained and written into the intermediate table. The above process can associate the analysis result of the request message with a log table for recording the processing process of the request message.
It should be noted that, when the specific operation is the parsing storage manner described in step S401 to step S403, the execution result is an identifier indicating that the parsing storage is successful or failed.
In another possible implementation, the operation indicated by the logic instruction performed on the request packet in step S103 may also be implemented by the following manner: analyzing the request message to obtain a service data screening condition contained in the request message; and determining target service data corresponding to the service data screening condition from the stored plurality of service data according to the service data screening condition. In this implementation, the obtained execution result is the determined target service data.
In a possible embodiment, if the operation indicated by the logic instruction is executed on the request packet in step S103 in step S401 to step S403, the interface management method may further be implemented in steps S501 to step S503 as follows:
step S501: after receiving a query request sent by a user, determining a target intermediate table according to a service identifier carried by the query request, wherein the target intermediate table stores a target request message, and the target request message comprises the service identifier.
Step S502: and determining a target log table corresponding to the target unique identifier according to the target unique identifier stored in the target intermediate table.
Step S503: and displaying the target intermediate table and the target log table.
Specifically, if the operation indicated by the logic instruction executed on the request packet in step S103 is implemented through steps S401 to S403, when the user wants to check the operation process requested on the packet, a query request carrying a service identifier may be sent to the manufacturing execution system, and when the manufacturing execution system receives the query request, since each stored request message includes the service identifier corresponding to the request message, the manufacturing execution system can determine which request message (i.e., target request message) the user wants to query corresponds to according to the service identifier, thereby determining the target intermediate table storing the target request message, on the target intermediate table, a unique identifier of a target log table recorded with a processing procedure of the target request message is also stored, that is: the target unique identifier is used for acquiring the target log list according to the target unique identifier; after the target intermediate table and the target log table are obtained, the target intermediate table and the target log table may be displayed on a graphical user interface corresponding to the manufacturing execution system.
It should be noted that, in the above process, the user may determine, in the target intermediate table displayed on the user graphical interface, whether the process of writing the target request message into the service table is successful or failed, determine, from the target log table, whether the process of receiving the target request message by the manufacturing execution system is successful or failed, determine, by the manufacturing execution system, whether the process of sending the result message corresponding to the target request message is successful or failed, and may also check whether the request message and the result message in the log table are correct, and position the location where the problem occurs by this method, thereby performing corresponding failure compensation.
It should be noted again that, when the user views the request message and the result message in the log table, the request message and the result message may also be listed in the intermediate table for viewing.
It should be noted again that other storage data except the unique identifier in the log table may also be used as a query index to determine the log table; such as: time, interface ID, etc.
Example two
Fig. 3 is a schematic structural diagram of an interface management apparatus according to a second embodiment of the present application, and as shown in fig. 3, the interface management apparatus includes:
a first determining module 601, configured to determine, after receiving a request packet carrying an interface tag sent by a target system, at least one candidate interface information including a uniform resource locator from a plurality of interface information pre-stored in a manufacturing execution system according to the uniform resource locator of the request packet; wherein the target system is a system connected to the manufacturing execution system;
a second determining module 602, configured to determine, in the at least one candidate interface information, target interface information including the interface tag;
the executing module 603 is configured to execute, according to the logic instruction obtained from the target interface information, the operation indicated by the logic instruction on the request packet, so as to obtain an execution result.
In a possible embodiment, the interface management device further includes:
the system comprises a creating module, a sending module and a receiving module, wherein the creating module is used for creating a log table after receiving a request message which is sent by a target system and carries an interface label, and setting a unique identifier for the log table;
the first writing module is used for writing first target data into the log table; wherein the first target data at least comprises: the unique identifier is used for identifying the unique identifier, the request message, a first time point for receiving the request message, a first result for indicating success or failure of receiving the request message, a result message, a second time point for sending the result message to the target system and a second result for indicating success or failure of sending the result message; wherein the interface ID is an interface ID included in the target interface information, and the result message is: and the manufacturing execution system sends a message containing the execution result to the target system through a target interface corresponding to the target interface information.
In a possible embodiment, after the creating module is configured to set a unique identifier for the log table, the interface management apparatus further includes:
the compression module is used for compressing the request message to obtain a first compressed message; compressing the result message to obtain a second compressed message;
the second writing module is used for writing second target data into the log table; wherein the second target data at least comprises: an interface ID, the unique identifier, the first compact packet, the first time point, the first result, the second compact packet, the second time point, and the second result.
In a possible implementation, when the execution module 603 is configured to execute the operation indicated by the logic instruction on the request packet, specifically:
analyzing the request message to obtain an analysis result;
writing the analysis result into an intermediate table, and writing the obtained unique identifier of the log table into the intermediate table;
and writing the analysis result and the unique identifier into a service table, and writing a third result for indicating success or failure of writing into the service table into the intermediate table.
In a possible embodiment, the interface management device further includes:
a third determining module, configured to determine a target intermediate table according to a service identifier carried in an inquiry request after receiving the inquiry request sent by a user, where the target intermediate table stores a target request packet, and the target request packet includes the service identifier;
the fourth determining module is used for determining a target log table corresponding to the target unique identifier according to the target unique identifier stored in the target intermediate table;
and the display module is used for displaying the target intermediate table and the target log table.
The apparatus provided in the embodiments of the present application may be specific hardware on a device, or software or firmware installed on a device, etc. The device provided by the embodiment of the present application has the same implementation principle and technical effect as the foregoing method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing method embodiments where no part of the device embodiments is mentioned. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the foregoing systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the interface management method provided in the embodiment of the present application, a plurality of interfaces are predefined in a manufacturing execution system, that is: the method comprises the following steps of predefining interface information of a plurality of interfaces, wherein each interface information comprises information such as a uniform resource locator, an interface label, a logic instruction and the like, when a target system (namely a production field control system) sends a request message (namely business data) to a manufacturing execution system, only the uniform resource locator and the interface label of a required interface need to be sent to the manufacturing execution system, and the manufacturing execution system can determine the target interface information in the stored plurality of interface information according to the uniform resource locator and the interface label, namely: after determining the target interface information, the interface information of the required interface directly executes the operation indicated by the logic instruction to the received request message according to the logic instruction (namely, execution logic) included in the target interface information; in the process, the developer only needs to input the uniform resource locator and the interface label of the required interface during each data transmission, and does not need to define the execution logic and other information of the interface, so that the method is favorable for reducing the workload of the developer.
EXAMPLE III
Fig. 4 shows a schematic structural diagram of a computer device provided in a third embodiment of the present application, and as shown in fig. 4, the device includes a memory 701, a processor 702, and a computer program stored in the memory 701 and executable on the processor 702, where the memory 701 and the processor 702 are communicatively connected through a bus, and the processor 702 implements the interface management method when executing the computer program.
Specifically, the memory 701 and the processor 702 can be general memories and processors, which are not limited specifically, and when the processor 702 runs a computer program stored in the memory 701, the steps of the interface management method can be executed, so that the problem of a large workload of developers in the prior art is solved.
Example four
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the interface management method.
Specifically, the storage medium can be a general-purpose storage medium, such as a removable disk, a hard disk, and the like, and when a computer program on the storage medium is executed, the steps of the interface management method can be executed, so that the problem of a large workload of developers in the prior art is solved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the present disclosure, which should be construed in light of the above teachings. Are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. An interface management method, comprising:
after receiving a request message which is sent by a target system and carries an interface label, determining at least one candidate interface information containing a uniform resource locator in a plurality of interface information prestored in a manufacturing execution system according to the uniform resource locator of the request message; wherein the target system is a system connected to the manufacturing execution system; the interface label is used for representing the specific function of the interface; the target system carries out data interaction with the manufacturing execution system in a mode of WebService RESTful or WebService Soap communication self-defined interface information and request message;
determining target interface information containing the interface tag in the at least one candidate interface information;
and executing the operation indicated by the logic instruction on the request message according to the logic instruction acquired from the target interface information to obtain an execution result.
2. The interface management method according to claim 1, wherein after receiving a request packet carrying an interface tag sent by a target system, the interface management method further comprises:
creating a log table and setting a unique identifier for the log table;
writing first target data into the log table; wherein the first target data at least comprises: the unique identifier is used for identifying the unique identifier, the request message, a first time point for receiving the request message, a first result for indicating success or failure of receiving the request message, a result message, a second time point for sending the result message to the target system and a second result for indicating success or failure of sending the result message; wherein the interface ID is an interface ID included in the target interface information, and the result message is: and the manufacturing execution system sends a message containing the execution result to the target system through a target interface corresponding to the target interface information.
3. The interface management method according to claim 2, wherein after said setting of the unique identifier for the log table, the interface management method further comprises:
compressing the request message to obtain a first compressed message; compressing the result message to obtain a second compressed message;
writing second target data into the log table; wherein the second target data at least comprises: an interface ID, the unique identifier, the first compact packet, the first time point, the first result, the second compact packet, the second time point, and the second result.
4. The interface management method according to claim 2, wherein the performing the operation indicated by the logic instruction on the request packet includes:
analyzing the request message to obtain an analysis result;
writing the analysis result into an intermediate table, and writing the obtained unique identifier of the log table into the intermediate table;
and writing the analysis result and the unique identifier into a service table, and writing a third result for indicating success or failure of writing into the service table into the intermediate table.
5. The interface management method according to claim 4, wherein the interface management method further comprises:
after receiving a query request sent by a user, determining a target intermediate table according to a service identifier carried by the query request, wherein the target intermediate table stores a target request message, and the target request message comprises the service identifier;
determining a target log table corresponding to the target unique identifier according to the target unique identifier stored in the target intermediate table;
and displaying the target intermediate table and the target log table.
6. An interface management apparatus, comprising:
the system comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for determining at least one candidate interface information containing a uniform resource locator in a plurality of interface information prestored in a manufacturing execution system according to the uniform resource locator of a request message after receiving the request message which is sent by a target system and carries an interface label; wherein the target system is a system connected to the manufacturing execution system; the interface label is used for representing the specific function of the interface; the target system carries out data interaction with the manufacturing execution system in a mode of WebService RESTful or WebService Soap communication self-defined interface information and request message;
a second determining module, configured to determine, in the at least one candidate interface information, target interface information including the interface tag;
and the execution module is used for executing the operation indicated by the logic instruction on the request message according to the logic instruction acquired from the target interface information to obtain an execution result.
7. The interface management apparatus of claim 6, wherein the interface management apparatus further comprises:
the system comprises a creating module, a sending module and a receiving module, wherein the creating module is used for creating a log table after receiving a request message which is sent by a target system and carries an interface label, and setting a unique identifier for the log table;
the first writing module is used for writing first target data into the log table; wherein the first target data at least comprises: the unique identifier is used for identifying the unique identifier, the request message, a first time point for receiving the request message, a first result for indicating success or failure of receiving the request message, a result message, a second time point for sending the result message to the target system and a second result for indicating success or failure of sending the result message; wherein the interface ID is an interface ID included in the target interface information, and the result message is: and the manufacturing execution system sends a message containing the execution result to the target system through a target interface corresponding to the target interface information.
8. The interface management apparatus according to claim 7, wherein after the creating module is configured to set a unique identifier for the log table, the interface management apparatus further comprises:
the compression module is used for compressing the request message to obtain a first compressed message; compressing the result message to obtain a second compressed message;
the second writing module is used for writing second target data into the log table; wherein the second target data at least comprises: an interface ID, the unique identifier, the first compact packet, the first time point, the first result, the second compact packet, the second time point, and the second result.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the interface management method according to any of the preceding claims 1-5 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the interface management method according to any one of the preceding claims 1 to 5.
CN202210069551.8A 2022-01-21 2022-01-21 Interface management method, device, equipment and storage medium Active CN114116730B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210069551.8A CN114116730B (en) 2022-01-21 2022-01-21 Interface management method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210069551.8A CN114116730B (en) 2022-01-21 2022-01-21 Interface management method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114116730A CN114116730A (en) 2022-03-01
CN114116730B true CN114116730B (en) 2022-04-12

Family

ID=80360893

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210069551.8A Active CN114116730B (en) 2022-01-21 2022-01-21 Interface management method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114116730B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101840228A (en) * 2010-06-01 2010-09-22 杭州和利时自动化有限公司 Method and device for collecting data of equipment of third party in distributed control system
CN101937224A (en) * 2003-07-30 2011-01-05 费舍-柔斯芒特系统股份有限公司 The method of in process device, using
CN103049271A (en) * 2012-12-27 2013-04-17 微梦创科网络科技(中国)有限公司 Method and device for automatically generating description document of API (application program interface)
CN106254423A (en) * 2016-07-20 2016-12-21 普元信息技术股份有限公司 The method realizing Restful service release quickly based on micro services framework
CN108885633A (en) * 2016-03-23 2018-11-23 交互智能集团有限公司 For finding and being connected to the technology of REST interface automatically
CN109491802A (en) * 2018-10-10 2019-03-19 福建天泉教育科技有限公司 A kind of method and adapter of the RESTFul network request based on Unity
CN109753532A (en) * 2018-12-26 2019-05-14 苏州宏软信息技术有限公司 Interface service system and its implementation method for browser end access database

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111917783B (en) * 2020-08-06 2023-06-23 吉林亿联银行股份有限公司 Method, device and storage medium for verifying universal message
CN113703781B (en) * 2021-07-16 2023-07-21 苏州浪潮智能科技有限公司 Storage system interface generation method and device, electronic equipment and readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101937224A (en) * 2003-07-30 2011-01-05 费舍-柔斯芒特系统股份有限公司 The method of in process device, using
CN101840228A (en) * 2010-06-01 2010-09-22 杭州和利时自动化有限公司 Method and device for collecting data of equipment of third party in distributed control system
CN103049271A (en) * 2012-12-27 2013-04-17 微梦创科网络科技(中国)有限公司 Method and device for automatically generating description document of API (application program interface)
CN108885633A (en) * 2016-03-23 2018-11-23 交互智能集团有限公司 For finding and being connected to the technology of REST interface automatically
CN106254423A (en) * 2016-07-20 2016-12-21 普元信息技术股份有限公司 The method realizing Restful service release quickly based on micro services framework
CN109491802A (en) * 2018-10-10 2019-03-19 福建天泉教育科技有限公司 A kind of method and adapter of the RESTFul network request based on Unity
CN109753532A (en) * 2018-12-26 2019-05-14 苏州宏软信息技术有限公司 Interface service system and its implementation method for browser end access database

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Java环境下REST风格Web服务的开发方法;黄华东;《科技信息(科学教研)》;20080520(第15期);398-399 *
基于RESTful Web Service的数据资源交换系统设计与实现;殷华杰等;《航空电子技术》;20210615(第02期);32-38 *
基于Spring Boot的云端数据监控管理与可视化应用系统;杜英魁等;《计算机系统应用》;20200515(第05期);125-129 *
钢铁行业中间件平台的研究与开发;张伟等;《冶金自动化》;20200715;第44卷(第04期);8-13 *

Also Published As

Publication number Publication date
CN114116730A (en) 2022-03-01

Similar Documents

Publication Publication Date Title
US10754631B2 (en) Tenant upgrade analytics
CN108153670B (en) Interface testing method and device and electronic equipment
CN107402880B (en) Test method and electronic equipment
US20180341573A1 (en) Cloud-based automated test execution factory
US8768957B2 (en) Consolidating related task data in process management solutions
US20100162113A1 (en) Operation support system, operation support method, and operation support program
CN113656307A (en) System capacity evaluation method, device, equipment and medium
CN114490005A (en) Log processing method and device, electronic equipment and storage medium
CN113254399A (en) Log query method and device, electronic equipment and medium
CN114116730B (en) Interface management method, device, equipment and storage medium
CN112083982B (en) Information processing method and device
CN113378346A (en) Method and device for model simulation
CN110851688A (en) Page request method, device and equipment
US20180063242A1 (en) Method and apparatus for operating infrastructure layer in cloud computing architecture
CN114371866A (en) Version reconfiguration test method, device and equipment of service system
CN110908636A (en) Interface simulation method and device for automatically providing interface service
CN116643794B (en) Information processing method and device and electronic equipment
JP2005044226A (en) Operation information gathering system
US20070156631A1 (en) Synchronization of transactional applications and analytical applications
CN118396631B (en) Online protocol text interaction method, system, electronic equipment and storage medium
CN112347741B (en) Information editing method, device, equipment and storage medium
CN112291329B (en) Information display method, device and equipment
CN114301790B (en) Data transmission method and device
CN117632994A (en) Data query method, data query device, electronic equipment and storage medium
US20240220237A1 (en) Smart grouping of code packages

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 503, North Automotive Building, No. 284 Baomin 1st Road, Wenhui Community, Xin'an Street, Bao'an District, Shenzhen City, Guangdong Province, 518100

Patentee after: Shenzhen Saimeite Information Technology Co.,Ltd.

Country or region after: China

Address before: 518000 Room 201, building A, 1 front Bay Road, Shenzhen Qianhai cooperation zone, Shenzhen, Guangdong

Patentee before: SHENZHEN WEIXUN INFORMATION TECHNOLOGY CO.,LTD.

Country or region before: China

CP03 Change of name, title or address