CN109254855B - Registration method and device of parameter transmission protocol and electronic equipment - Google Patents

Registration method and device of parameter transmission protocol and electronic equipment Download PDF

Info

Publication number
CN109254855B
CN109254855B CN201810997094.2A CN201810997094A CN109254855B CN 109254855 B CN109254855 B CN 109254855B CN 201810997094 A CN201810997094 A CN 201810997094A CN 109254855 B CN109254855 B CN 109254855B
Authority
CN
China
Prior art keywords
operation type
parameter
identifier
parameter data
processing
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
CN201810997094.2A
Other languages
Chinese (zh)
Other versions
CN109254855A (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201810997094.2A priority Critical patent/CN109254855B/en
Publication of CN109254855A publication Critical patent/CN109254855A/en
Application granted granted Critical
Publication of CN109254855B publication Critical patent/CN109254855B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications

Abstract

The embodiment of the invention provides a registration method and device of a parameter transmission protocol and electronic equipment. The method comprises the following steps: acquiring an operation type identifier and a callback function, wherein the operation type identifier is used for representing an operation type, and the callback function is used for processing parameter data of the operation type; generating a parameter transmission protocol based on the operation type identifier and the callback function; registering the parameter transmission protocol in a tool process and a processing process respectively, wherein the parameter transmission protocol is used for sending the operation type identifier to the processing process by the tool process when the tool process sends the parameter data of the operation type to the processing process, and calling the callback function to process the received parameter data by the processing process when the processing process receives the parameter data and the operation type identifier. The labor cost required by the parameter data compatible with the new operation type can be reduced, and the expansibility of the scheme is improved.

Description

Registration method and device of parameter transmission protocol and electronic equipment
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a method and an apparatus for registering a parameter transmission protocol, and an electronic device.
Background
In the working process of the multi-process program, data packets may be sent and received among a plurality of processes, one process (hereinafter referred to as a processing thread) may be specially responsible for sending and receiving the data packets, and another thread (hereinafter referred to as a tool thread) may be used as a tool to transmit configuration parameters to the processing thread, so as to implement configurable processing of the data packets. For example, the tool thread may add a parameter for configuring packet transmission in the processing process, or the tool process reads a specified parameter from the processing process to determine whether the parameter has an exception, which is the process of parameter transmission.
Specifically, the tool process may send parameter data to the processing process, and the processing process processes the parameter data to complete parameter transmission. In order for the processing process to correctly process the parameter data, the same parameter transmission protocol needs to be registered in the tool process and the processing process, respectively. However, when parameter data of a new operation type appears, there is no way between the tool process and the process to normally complete parameter transfer. In the prior art, the parameter transmission protocol may be modified manually to add a new convention to the parameter transmission protocol for agreeing on the processing method of the parameter data of the operation type, and the modified parameter transmission protocol is registered in the tool process and the processing process, respectively.
The inventor finds that the prior art at least has the following problems in the process of implementing the invention:
when the parameter data of a new operation type appears each time, a complete processing flow needs to be appointed aiming at the parameter data of the new operation type in a parameter transmission protocol manually, so that the labor cost is high, and the expansibility is low.
Disclosure of Invention
The embodiment of the invention aims to provide a registration method and a registration device for a parameter transmission protocol and electronic equipment, so as to reduce the labor cost required by compatibility of a new parameter transmission data type. The specific technical scheme is as follows:
in a first aspect of an embodiment of the present invention, a method for registering a parameter protocol is provided, where the method includes:
acquiring an operation type identifier and a callback function, wherein the operation type identifier is used for representing an operation type, and the callback function is used for processing parameter data of the operation type;
generating a parameter transmission protocol based on the operation type identifier and the callback function;
registering the parameter transmission protocol in a tool process and a processing process respectively, wherein the parameter transmission protocol is used for sending the operation type identifier to the processing process by the tool process when the tool process sends the parameter data of the operation type to the processing process, and calling the callback function to process the received parameter data by the processing process when the processing process receives the parameter data and the operation type identifier.
With reference to the first aspect, in a first possible implementation manner, the operation type identifier includes a primary type sub identifier and a secondary type sub identifier, where the primary type sub identifier is used to indicate that the operation type is a read operation or a write operation, and the secondary type sub identifier is used to indicate an operation sequence of the operation type.
With reference to the first aspect, in a second possible implementation manner, the registering of the parameter transfer protocol in the tool process and the registering of the parameter transfer protocol in the processing process are further configured to send a response code to the tool process after the processing process calls the callback function to process the received parameter data, where the response code is used to indicate whether an exception exists in a process of calling the callback function to process the received parameter data.
With reference to the first possible implementation manner of the first aspect, in a third possible implementation manner, if the main type sub identifier indicates that the operation type is a read operation, the parameter transmission protocols are respectively registered in a tool process and a processing process, and the main type sub identifier is further configured to send response data to the tool process according to a processing result of received parameter data after the processing process calls the callback function to process the received parameter data, where the response data includes a parameter to be read by the tool process.
With reference to the first aspect, in a fourth possible implementation manner, the registering of the parameter transmission protocol in the tool process and the processing process is specifically configured to send, by the tool process, the parameter data of the operation type to the processing process in the following manner:
storing the parameter data and the operation type identifier in a preset structure body;
and sending the preset structural body to the processing progress.
In a second aspect of the embodiments of the present invention, there is provided an apparatus for registering a parameter transmission protocol, the apparatus including:
the protocol information acquisition module is used for acquiring an operation type identifier and a callback function, wherein the operation type identifier is used for representing an operation type, and the callback function is used for processing parameter data of the operation type;
the protocol generation module is used for generating a parameter transmission protocol based on the operation type identifier and the callback function;
a protocol registration module, configured to register the parameter transmission protocol in a tool process and a processing process, respectively, and to send the operation type identifier to the processing process by the tool process when the tool process sends the parameter data of the operation type to the processing process, and to call the callback function to process the received parameter data by the processing process when the processing process receives the parameter data and the operation type identifier.
With reference to the second aspect, in a first possible implementation manner, the operation type identifier includes a primary type sub identifier and a secondary type sub identifier, where the primary type sub identifier is used to indicate that the operation type is a read operation or a write operation, and the secondary type sub identifier is used to indicate an operation sequence of the operation type.
With reference to the second aspect, in a second possible implementation manner, the protocol registration module is further configured to send a response code to the tool process after the processing process invokes the callback function to process the received parameter data, where the response code is used to indicate whether an exception exists in a process of invoking the parameter data received by the callback function.
With reference to the first possible implementation manner of the second aspect, in a third possible implementation manner, if the primary type sub identifier indicates that the operation type is a read operation, the protocol registration module is further configured to send, according to a processing result of the received parameter data, response data to the tool process after the processing process calls the parameter data received by the callback function, where the response data includes a parameter to be read by the tool process.
With reference to the second aspect, in a fourth possible implementation manner, the protocol registration module is specifically configured to send, by the tool process, the parameter data of the operation type to the processing process in a following manner:
storing the parameter data and the operation type identifier in a preset structure body;
and sending the preset structural body to the processing progress.
In a third aspect of the embodiments of the present invention, an electronic device is provided, which includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and a processor for executing the program stored in the memory, the method for registering any of the above-mentioned parameter transmission protocols.
In a fourth aspect of the embodiments of the present invention, there is provided a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to execute any of the above-described parameter transmission protocol registration methods.
In a fifth aspect of embodiments of the present invention, there is provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the above-described methods of registering for a parametric transport protocol.
According to the registration method, the registration device and the electronic device of the parameter transmission protocol, provided by the embodiment of the invention, the corresponding parameter transmission protocol can be automatically generated and registered according to the acquired operation type identifier and the callback function so as to be appointed in the tool process and the processing process, and the processing method is used for processing the parameter data of the operation type represented by the operation type identifier. Aiming at each new operation type, only an operation type identifier and a callback function need to be specified for the new operation type, and a complete processing flow is not required to be appointed for the parameter data of the new operation type on the basis of the original parameter transmission protocol, so that the labor cost required by the parameter data compatible with the new operation type is reduced, and the expansibility of the scheme is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart illustrating a method for registering a parameter transfer protocol according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a parameter data processing method according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a parameter data processing method according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart illustrating a parameter data processing method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a registration apparatus of a parameter transmission protocol according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a method for registering a parameter transmission protocol according to an embodiment of the present invention, where the method includes:
s110, obtaining an operation type identifier and a callback function, wherein the operation type identifier is used for representing an operation type, and the callback function is used for processing parameter data of the operation type.
The operation identifier may be one or a set of integer data corresponding to the operation type, or may also be one or a set of character data corresponding to the operation type, each operation type corresponds to only one operation type, the callback function may be a processing function written by the user for the operation type indicated by the operation type identifier, and one callback function may be used for processing only parameter data of one operation type, or may be used for processing parameter data of multiple operation types.
Further, in an alternative embodiment, the operation type identifier may include a primary type sub identifier and a secondary type sub identifier, where the primary type sub identifier is used to indicate that the operation type is a read operation or a write operation, and the secondary type sub identifier is used to indicate an operation sequence of the operation type. Illustratively, the primary type sub-identifier may be GET and SET, where GET is used to indicate that the operation type is read operation, SET is used to indicate that the operation type is write operation, the secondary type sub-identifier may be one or a group of integer data, such as 1, 2, 3 or {1, 2}, {2, 3}, it may be agreed that 1 represents add operation, 2 represents delete operation, 3 represents copy operation, and the sequence of operations represented by the secondary type sub-identifier may include only one operation or a plurality of operations according to actual requirements. It will be appreciated that a read operation means that the tool process reads a parameter from the process and a write operation means that the tool process writes a parameter to the process. Since one callback function cannot process the operation type of the read operation and the operation type of the write operation at the same time, the embodiment can be selected to distinguish the operation type of the read operation from the operation type of the write operation, thereby realizing more effective management for the parameter transfer protocol.
And S120, generating a parameter transmission protocol based on the operation type identifier and the callback function.
The format of the parameter transmission protocol may be set according to actual requirements, and the generated parameter transmission protocol may include an operation type identifier and a callback function, or may be used to represent related information of the operation type identifier and the callback function. In other embodiments, the operation type and the callback function may be stored in a plurality of different data structures, and the plurality of different data structures jointly form the parameter transfer protocol.
The processing process and the tool process are registered with a registration protocol in advance, and the registration protocol is used for appointing how the processing process and the tool process analyze the data set and how to process the operation type identifier and the callback function included in the data set so as to realize the registration of the parameter transmission protocol represented by the data set. In this case, the registration parameter transfer protocol may be to save the data set in a registration linked list.
S130, registering parameter transmission protocols in the tool process and the processing process respectively, wherein the parameter transmission protocols are used for sending an operation type identifier to the processing process by the tool process when the tool process sends the parameter data of the operation type to the processing process, and calling a callback function to process the received parameter data by the processing process when the processing process receives the parameter data and the operation type identifier.
In an optional embodiment, the tool process may store the parameter data and the operation type identifier in a preset structure and send the preset structure to the processing process, and the tool process may unify formats of the tool process for sending the parameter data through the preset structure, so that a parameter transmission process is more standard, and a risk of a problem occurring in the parameter transmission process is reduced.
In an optional embodiment, in order to facilitate searching for the parameter transmission protocol, when the parameter transmission protocol is registered, the parameter transmission protocol may be stored in different registration linked lists according to a difference of the sub-identifier of the main operation type in the operation type identifier, for example, when the main operation type identifier indicates a read operation, the parameter transmission protocol is stored in a first registration linked list, and when the main operation type identifier indicates a write operation, the parameter transmission protocol is stored in a second registration linked list.
Further, the parameter protocol may not be registered at the tool process and the process at the same time. In an alternative embodiment, the parameter transmission protocol may be first registered in the tool process, and data snooping is started for the processing process, and when the processing process receives or is about to receive the parameter data of the operation type through data snooping, the parameter transmission protocol is registered in the processing process.
By adopting the embodiment, the corresponding parameter transmission protocol can be automatically generated and registered according to the acquired operation type identifier and the callback function so as to appoint in the tool process and the processing process, and the processing method is used for processing the parameter data of the operation type represented by the operation type identifier. For each new operation type, only an operation type identifier and a callback function need to be specified for the new operation type, and on the basis of the original parameter transmission protocol, a complete processing flow is agreed for the parameter data of the new operation type, so that the labor cost required for the parameter data compatible with the new operation type can be reduced, and the expansibility of the scheme is improved.
In order to describe the registration method of the parameter transmission protocol provided according to the embodiment of the present invention more clearly, the following describes the processing procedure agreed by the parameter transmission protocol in detail by taking the processing procedure as an execution main body, referring to fig. 2, and fig. 2 is a schematic flow chart of a parameter data processing method of the processing procedure provided by the embodiment of the present invention, which may include:
s210, acquiring operation type identification and parameter data.
The operation type identifier is used to indicate an operation type of the parameter data, and specifically, the operation type identifier and the parameter data may be obtained by parsing a data packet sent by a tool process.
S220, searching a local parameter transmission protocol, and acquiring a callback function corresponding to the operation type identifier.
For example, the local parameter transmission protocol may be stored in a registration linked list, and this step may be to search the local registration linked list to determine a callback function agreed by the parameter data of the operation type indicated by the operation type identifier in the local parameter protocol, and use the callback function as the callback function corresponding to the operation type identifier. It will be appreciated that if a parameter transfer protocol cannot be found in the local parameter transfer protocol that agrees on how to handle parameter data for an operation type represented by the operation type identifier, the parameter data may be released.
And S230, calling the callback function to process the parameter data.
In an alternative embodiment, as shown in fig. 3, after S230, the method may further include:
s240, response codes are sent to the tool process.
The response code is used to indicate whether an exception exists in the execution process of S230, and it can be understood that, if the response code indicates that an exception exists in the execution process of S230, the tool process may send parameter data to the processing process again after receiving the response code, or may record the exception, or generate alarm information. With the embodiment, a feedback can be formed between the processing process and the tool process, so that the tool process can acquire the state of the processing process and can perform subsequent processing according to the state, and the stability of the parameter transmission process can be improved.
In an alternative embodiment, if the main operation type sub-identifier indicates that the operation type is a read operation, as shown in fig. 4, after S230, the method may further include:
and S250, sending response data to the tool process according to the received processing result of the parameter data, wherein the response data comprises the parameters to be read by the tool process.
In this embodiment, the tool process may store the parameter data and the operation type identifier in a preset structure and send the parameter data and the operation type identifier to the processing process, and after the processing process calls the callback function to process the parameter data, the processing process may store the response data in the preset structure according to the processing result, and feed back the preset structure to the tool process. Or the response data can be packaged separately and sent to the tool process.
By adopting the embodiment, the mode of sending the parameter to be read to the tool process by the registered parameter transmission protocol unified processing process can be utilized, so that the parameter transmission process is more standard, and the risk of problems in the parameter transmission process is reduced.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a registration apparatus of a parameter transmission protocol according to an embodiment of the present invention, where the registration apparatus may include:
a protocol information obtaining module 501, configured to obtain an operation type identifier and a callback function, where the operation type identifier is used to indicate an operation type, and the callback function is used to process parameter data of the operation type;
a protocol generation module 502, configured to generate a parameter transmission protocol based on the operation type identifier and the callback function;
the protocol registration module 503 is configured to register a parameter transmission protocol in the tool process and the processing process, respectively, and is configured to send an operation type identifier to the processing process when the tool process sends parameter data of an operation type to the processing process, and call a callback function to process the received parameter data when the processing process receives the parameter data and the operation type identifier.
Further, the operation type identifier includes a main type sub identifier and an auxiliary type sub identifier, the main type sub identifier is used for indicating that the operation type is a read operation or a write operation, and the auxiliary type sub identifier is used for indicating an operation sequence of the operation type.
Further, the protocol registration module 503 is further configured to send a response code to the tool process after the processing process calls the callback function to process the received parameter data, where the response code is used to indicate whether an exception exists in a process of calling the parameter data received by the callback function.
Further, if the main type sub-identifier indicates that the operation type is a read operation, the protocol registration module 503 is further configured to send response data to the tool process according to a processing result of the received parameter data after the processing process calls the parameter data received by the callback function, where the response data includes a parameter to be read by the tool process.
Further, the protocol registration module 503 is specifically configured to send the parameter data of the operation type to the processing process by the tool process in the following manner:
storing the parameter data and the operation type identifier in a preset structure body;
and sending the preset structural body to the processing progress.
An embodiment of the present invention further provides an electronic device, as shown in fig. 6, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement the following steps when executing the program stored in the memory 603:
acquiring an operation type identifier and a callback function, wherein the operation type identifier is used for representing an operation type, and the callback function is used for processing parameter data of the operation type;
generating a parameter transmission protocol based on the operation type identifier and the callback function;
the parameter transmission protocols are respectively registered in the tool process and the processing process, and are used for sending the operation type identifier to the processing process by the tool process when the tool process sends the parameter data of the operation type to the processing process, and calling the callback function to process the received parameter data by the processing process when the processing process receives the parameter data and the operation type identifier.
Further, the operation type identifier includes a main type sub identifier and an auxiliary type sub identifier, the main type sub identifier is used for indicating that the operation type is a read operation or a write operation, and the auxiliary type sub identifier is used for indicating an operation sequence of the operation type.
Further, the parameter transmission protocols are registered in the tool process and the processing process, respectively, and the processing process is further configured to send a response code to the tool process after the processing process calls the callback function to process the received parameter data, where the response code is used to indicate whether an exception exists in a process of calling the callback function to process the received parameter data.
Further, if the main type sub-identifier indicates that the operation type is a read operation, the parameter transmission protocols are respectively registered in the tool process and the processing process, and the main type sub-identifier is further used for sending response data to the tool process according to a processing result of the received parameter data after the processing process calls the callback function to process the received parameter data, wherein the response data comprises parameters to be read by the tool process.
Further, a parameter transmission protocol is registered in the tool process and the processing process, and is specifically used for the tool process to send the parameter data of the operation type to the processing process by using the following modes:
storing the parameter data and the operation type identifier in a preset structure body;
and sending the preset structural body to a processing process.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In another embodiment of the present invention, there is also provided a computer-readable storage medium, having stored therein instructions, which when run on a computer, cause the computer to execute the registration method of the parameter transmission protocol in any one of the above embodiments.
In a further embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method of registering for a parameter transfer protocol of any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the electronic device, the computer-readable storage medium, and the computer program product, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (9)

1. A method for registering a parameter transmission protocol, comprising:
acquiring an operation type identifier and a callback function, wherein the operation type identifier is used for representing an operation type, and the callback function is used for processing parameter data of the operation type;
generating a parameter transmission protocol based on the operation type identifier and the callback function;
registering the parameter transmission protocol in a tool process and a processing process respectively, wherein the parameter transmission protocol is used for transmitting the operation type identifier to the processing process by the tool process when the tool process transmits the parameter data of the operation type to the processing process, and calling the callback function to process the received parameter data by the processing process when the processing process receives the parameter data and the operation type identifier;
the operation type identifier comprises a main type sub identifier and an auxiliary type sub identifier, the main type sub identifier is used for indicating that the operation type is read operation or write operation, and the auxiliary type sub identifier is used for indicating an operation sequence of the operation type.
2. The method according to claim 1, wherein the registering of the parameter transfer protocol in the tool process and the processing process respectively is further configured to send a response code to the tool process after the processing process processes the received parameter data after the calling of the callback function, wherein the response code is used for indicating whether an exception exists in the process of calling the callback function to process the received parameter data.
3. The method according to claim 1, wherein if the main-type sub-identifier indicates that the operation type is a read operation, the parameter transfer protocol is registered in a tool process and a processing process, respectively, and further configured to send response data to the tool process according to a processing result of the received parameter data after the processing process processes the received parameter data by calling the callback function, where the response data includes a parameter to be read by the tool process.
4. The method according to claim 1, wherein the parameter transfer protocol is registered separately in a tool process and in a processing process, in particular for the tool process to send parameter data of the operation type to the processing process by means of:
storing the parameter data and the operation type identifier in a preset structure body;
and sending the preset structural body to the processing progress.
5. An apparatus for registering a parameter transmission protocol, comprising:
the protocol information acquisition module is used for acquiring an operation type identifier and a callback function, wherein the operation type identifier is used for representing an operation type, and the callback function is used for processing parameter data of the operation type;
the protocol generation module is used for generating a parameter transmission protocol based on the operation type identifier and the callback function;
a protocol registration module, configured to register the parameter transmission protocol in a tool process and a processing process, respectively, where the parameter transmission protocol is used to send the operation type identifier to the processing process when the tool process sends the parameter data of the operation type to the processing process, and the processing process calls the callback function to process the received parameter data when the processing process receives the parameter data and the operation type identifier;
the operation type identifier comprises a main type sub identifier and an auxiliary type sub identifier, the main type sub identifier is used for indicating that the operation type is read operation or write operation, and the auxiliary type sub identifier is used for indicating an operation sequence of the operation type.
6. The apparatus according to claim 5, wherein the protocol registration module is further configured to send a response code to the tool process after the processing process processes the received parameter data by invoking the callback function, the response code being used to indicate whether there is an exception in the process of invoking the parameter data received by the callback function.
7. The apparatus according to claim 5, wherein if the main-type sub-identifier indicates that the operation type is a read operation, the protocol registration module is further configured to send response data to the tool process according to a processing result of the received parameter data after the parameter data received by the processing process after the call of the callback function is performed, where the response data includes a parameter to be read by the tool process.
8. The apparatus according to claim 5, wherein the protocol registration module is specifically configured to send, by the tool process, the parameter data of the operation type to the processing process in a manner that:
storing the parameter data and the operation type identifier in a preset structure body;
and sending the preset structural body to the processing progress.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 4 when executing a program stored in the memory.
CN201810997094.2A 2018-08-29 2018-08-29 Registration method and device of parameter transmission protocol and electronic equipment Active CN109254855B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810997094.2A CN109254855B (en) 2018-08-29 2018-08-29 Registration method and device of parameter transmission protocol and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810997094.2A CN109254855B (en) 2018-08-29 2018-08-29 Registration method and device of parameter transmission protocol and electronic equipment

Publications (2)

Publication Number Publication Date
CN109254855A CN109254855A (en) 2019-01-22
CN109254855B true CN109254855B (en) 2022-06-03

Family

ID=65050242

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810997094.2A Active CN109254855B (en) 2018-08-29 2018-08-29 Registration method and device of parameter transmission protocol and electronic equipment

Country Status (1)

Country Link
CN (1) CN109254855B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111506307B (en) * 2020-04-10 2023-04-14 凌云光技术股份有限公司 Parameter chain-based subentry expansion method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309730A (en) * 2012-03-15 2013-09-18 腾讯科技(深圳)有限公司 Method and device for inter-process callback
CN106648928A (en) * 2016-11-29 2017-05-10 成都广达新网科技股份有限公司 Method and device for inter-process communication

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7945676B2 (en) * 2005-03-10 2011-05-17 International Business Machines Corporation Processing requests transmitted using a first communication protocol directed to an application that uses a second communication protocol
US8250587B2 (en) * 2005-10-27 2012-08-21 Trapeze Networks, Inc. Non-persistent and persistent information setting method and system for inter-process communication
CN100543675C (en) * 2007-12-26 2009-09-23 上海科泰世纪科技有限公司 The method of adjusting back based on the component interface realization event in the computer software
US8792489B2 (en) * 2012-03-29 2014-07-29 International Business Machines Corporation Communication transport protocol for distributed information technology architectures
CN104185096B (en) * 2014-09-12 2019-07-02 上海斐讯数据通信技术有限公司 A kind of ONU registed authorization method and system
CN106453766B (en) * 2015-08-04 2019-04-09 阿里巴巴集团控股有限公司 Data transmission method, apparatus and system based on virtual machine
CN108076007A (en) * 2016-11-10 2018-05-25 阿里巴巴集团控股有限公司 A kind of implementation method of interface, device and equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309730A (en) * 2012-03-15 2013-09-18 腾讯科技(深圳)有限公司 Method and device for inter-process callback
CN106648928A (en) * 2016-11-29 2017-05-10 成都广达新网科技股份有限公司 Method and device for inter-process communication

Also Published As

Publication number Publication date
CN109254855A (en) 2019-01-22

Similar Documents

Publication Publication Date Title
WO2021180025A1 (en) Message processing method and apparatus, electronic device and medium
CN110022259B (en) Message arrival rate determining method and device, data statistics server and storage medium
CN112905323B (en) Data processing method, device, electronic equipment and storage medium
US20230412742A1 (en) Apparatus, method, and system for monitoring image-forming apparatus, and storage medium
CN112835885B (en) Processing method, device and system for distributed form storage
CN111355765B (en) Network request processing and sending method and device
CN109600254B (en) Method for generating full-link log and related system
CN111125240B (en) Distributed transaction realization method and device, electronic equipment and storage medium
CN109254855B (en) Registration method and device of parameter transmission protocol and electronic equipment
CN110727895B (en) Sensitive word sending method and device, electronic equipment and storage medium
CN111522626B (en) Virtual machine list generation method and device and electronic equipment
CN110674153B (en) Data consistency detection method and device and electronic equipment
CN114675982A (en) General method and system for acquiring data of service integration system
CN110955460B (en) Service process starting method and device, electronic equipment and storage medium
CN110309028B (en) Monitoring information acquisition method, service monitoring method, device and system
CN110427538B (en) Data query method, data storage method, data query device, data storage device and electronic equipment
CN113298331A (en) Work order processing method, device and system and electronic equipment
WO2020029588A1 (en) Data reading method, device, system, and distributed system
CN110020166B (en) Data analysis method and related equipment
US9659041B2 (en) Model for capturing audit trail data with reduced probability of loss of critical data
CN111736848B (en) Packet conflict positioning method, device, electronic equipment and readable storage medium
CN108288135B (en) System compatibility method and device, computer readable storage medium and electronic equipment
CN111880949A (en) Method, system, device, server and terminal for processing service information
CN110888643A (en) Page processing method and device
CN111125232A (en) Method and device for accessing public cloud asset information

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