CN108932123B - Parameter processing method and device - Google Patents

Parameter processing method and device Download PDF

Info

Publication number
CN108932123B
CN108932123B CN201810646530.1A CN201810646530A CN108932123B CN 108932123 B CN108932123 B CN 108932123B CN 201810646530 A CN201810646530 A CN 201810646530A CN 108932123 B CN108932123 B CN 108932123B
Authority
CN
China
Prior art keywords
parameter
parameters
type
tuple
class
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
CN201810646530.1A
Other languages
Chinese (zh)
Other versions
CN108932123A (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 Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201810646530.1A priority Critical patent/CN108932123B/en
Publication of CN108932123A publication Critical patent/CN108932123A/en
Application granted granted Critical
Publication of CN108932123B publication Critical patent/CN108932123B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a parameter processing method and device. The method comprises the following steps: acquiring a plurality of parameters to be processed; storing the parameters into a universal type object according to a preset parameter conversion template to obtain universal type information corresponding to the universal type object; and transmitting the general type information to a parameter receiver, and acquiring the parameters by the parameter receiver according to the general type information. The technical scheme has the advantages that any number of parameters of any type can be theoretically supported through the parameter conversion template, serialization and deserialization are not needed, and the method is safe and high in efficiency.

Description

Parameter processing method and device
Technical Field
The invention relates to the technical field of computers, in particular to a parameter processing method and device.
Background
It is well known to developers that the types of parameters are diversified, and for example, basic types (int, long Long, character string char … …), functions, pointers, etc. can be used as parameters.
However, as demand continues to change, many new problems arise. For example, the type of the parameters that the parameter receiver wants to receive and the number of the parameters are not fixed, so that it is obviously not easy to realize if all the situations are considered one by one. One way is to serialize the parameters to be transmitted into a string and deserialize the string after the parameters are received by the paramenter, but this is very unsafe, has limitations on the parameters, and is very inefficient.
Disclosure of Invention
In view of the above, the present invention has been made to provide a parameter processing method and apparatus that overcomes or at least partially solves the above problems.
According to an aspect of the present invention, there is provided a parameter processing method, including:
acquiring a plurality of parameters to be processed;
storing the parameters into a universal type object according to a preset parameter conversion template to obtain universal type information corresponding to the universal type object;
and transmitting the general type information to a parameter receiver, and acquiring the parameters by the parameter receiver according to the general type information.
Optionally, the parameter comprises one or more of:
basic type objects, lambda expressions, pointers, intelligent pointers, and ordinary functions.
Optionally, the preset parameter conversion template includes an empty parameter packaging base class and a derived class of the parameter packaging base class implemented according to the template;
the step of storing the parameters as a general type object according to a preset parameter conversion template to obtain general type information corresponding to the general type object comprises the following steps:
and generating a derived class object corresponding to the parameters according to the derived class structure to obtain a base class pointer corresponding to the derived class object.
Optionally, the generating a derived class object corresponding to the several parameters according to the derived class structure includes:
and packaging the parameters according to the parameter packaging method in the derived class.
Optionally, the packaging the parameters according to the parameter packaging method in the derived class includes:
and creating a tuple according to the variable parameter template in the parameter packaging method, and writing the parameters into the tuple.
Optionally, the creating a tuple according to the variable parameter template in the parameter packing method includes: determining the index information of the parameters in the tuple.
Optionally, the index information includes a writing type of a parameter corresponding to each position in the tuple.
Optionally, the generating a derived class object corresponding to the several parameters according to the derived class structure includes:
when the number of the parameters to be processed is one, judging whether the type of the parameters belongs to a preset type;
if yes, storing the parameter in the memory space applied by the derived class, otherwise, applying a new memory space for storing the parameter.
Optionally, the memory space of the derived class application is sequentially divided into three areas, and the three areas are sequentially used for storing the virtual function table, the base class pointer and the parameter.
Optionally, the parameter receiver is an observer in an observer mode or a function to be executed.
According to another aspect of the present invention, there is provided a parameter processing method, including:
acquiring general type information corresponding to a general type object, wherein the general type object stores a plurality of parameters;
and according to the general type information, taking out the target parameters from the general type object according to the specified type.
Optionally, the generic type object is generated according to a preset parameter conversion template, where the preset parameter conversion template includes an empty parameter packaging base class and a derived class of the parameter packaging base class implemented according to a template;
the generic type object is specifically a derived class object generated according to the derived class structure, and the generic type information is a base class pointer corresponding to the derived class.
Optionally, the generic type object includes a tuple storing the several parameters and index information of the tuple;
the step of taking out the target parameters from the general type object according to the specified type according to the general type information comprises the following steps: inheriting the parameters in the derived classes to obtain virtual functions, and taking out corresponding parameters from the tuples according to the base class pointers and the index information.
Optionally, the index information includes a write type of a parameter corresponding to each position in the tuple;
the extracting the corresponding parameter from the tuple according to the base class pointer and the index information includes: and acquiring the parameters of the corresponding positions according to the write-in type of the parameters corresponding to the positions in the tuple.
Optionally, the obtaining, according to the write-in type of the parameter corresponding to each position in the tuple, the parameter of the corresponding position includes:
determining a taking-out type matched with the writing type according to a preset fuzzy matching rule;
taking out the parameters of the corresponding positions according to the matched taking-out type;
in the fuzzy matching rule, one fetch type corresponds to one or more write types.
According to another aspect of the present invention, there is provided a parameter processing apparatus, including:
the parameter acquisition unit is suitable for acquiring a plurality of parameters to be processed;
the parameter processing unit is suitable for converting the template according to the preset parameters, storing the parameters as a universal type object and obtaining the universal type information corresponding to the universal type object;
and the parameter transmitting unit is suitable for transmitting the general type information to a parameter receiver, and the parameter receiver acquires the parameters according to the general type information.
Optionally, the parameter comprises one or more of:
basic type objects, lambda expressions, pointers, intelligent pointers, and ordinary functions.
Optionally, the preset parameter conversion template includes an empty parameter packaging base class and a derived class of the parameter packaging base class implemented according to the template;
and the parameter processing unit is suitable for generating a derived class object corresponding to the parameters according to the derived class structure to obtain a base class pointer corresponding to the derived class object.
Optionally, the parameter processing unit is adapted to package the parameters according to a parameter packaging method in the derived class.
Optionally, the parameter processing unit is adapted to create a tuple according to the variable parameter template in the parameter packing method, and write the parameters into the tuple.
Optionally, the parameter processing unit is adapted to determine index information of the several parameters in the tuple.
Optionally, the index information includes a writing type of a parameter corresponding to each position in the tuple.
Optionally, the parameter processing unit is adapted to determine whether the type of the parameter belongs to a preset type when the number of the parameters to be processed is one; if yes, storing the parameter in the memory space applied by the derived class, otherwise, applying a new memory space for storing the parameter.
Optionally, the memory space of the derived class application is sequentially divided into three areas, and the three areas are sequentially used for storing the virtual function table, the base class pointer and the parameter.
Optionally, the parameter receiver is an observer in an observer mode or a function to be executed.
According to still another aspect of the present invention, there is provided a parameter processing apparatus, including:
the device comprises a general type information acquisition unit, a data processing unit and a data processing unit, wherein the general type information acquisition unit is suitable for acquiring general type information corresponding to a general type object, and the general type object stores a plurality of parameters;
and the parameter extraction unit is suitable for extracting the target parameters from the general type object according to the general type information and the specified type.
Optionally, the generic type object is generated according to a preset parameter conversion template, where the preset parameter conversion template includes an empty parameter packaging base class and a derived class of the parameter packaging base class implemented according to a template;
the generic type object is specifically a derived class object generated according to the derived class structure, and the generic type information is a base class pointer corresponding to the derived class.
Optionally, the generic type object includes a tuple storing the several parameters and index information of the tuple;
the parameter extraction unit is suitable for inheriting the parameters in the derived classes to obtain the virtual functions and extracting corresponding parameters from the tuples according to the base class pointers and the index information.
Optionally, the index information includes a write type of a parameter corresponding to each position in the tuple;
and the parameter extraction unit is suitable for acquiring the parameters of the corresponding positions according to the write-in type of the parameters corresponding to each position in the tuple.
Optionally, the parameter extraction unit is adapted to determine, according to a preset fuzzy matching rule, a fetch type matched with the write type; taking out the parameters of the corresponding positions according to the matched taking-out type; in the fuzzy matching rule, one fetch type corresponds to one or more write types.
According to still another aspect of the present invention, there is provided an intelligent terminal including: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to perform a method as any one of the above.
According to a further aspect of the invention, there is provided a computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement a method as any one of the above.
According to the technical scheme, after the parameters to be processed are obtained, the preset parameter conversion template is used for storing the parameters as the universal type objects, the universal type information corresponding to the universal type objects is obtained, when the parameters are used, the universal type information is transmitted to the parameter receiver, and the parameter receiver obtains the parameters according to the universal type information. The technical scheme has the advantages that any number of parameters of any type can be theoretically supported through the parameter conversion template, serialization and deserialization are not needed, and the method is safe and high in efficiency.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 shows a flow diagram of a parameter processing method according to an embodiment of the invention;
FIG. 2 is a flow diagram illustrating another parameter processing method according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a parameter processing apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a parameter processing apparatus according to an embodiment of the present invention;
FIG. 5 shows a schematic structural diagram of an intelligent terminal according to one embodiment of the invention;
fig. 6 shows a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 shows a flow diagram of a parameter processing method according to an embodiment of the invention. As shown in fig. 1, the method includes:
step S110, a plurality of parameters to be processed are obtained. In an embodiment of the present invention, in the above method, the parameter includes one or more of: basic type objects, lambda expressions, pointers, intelligent pointers, and ordinary functions. There are many parameters that can be handled in practice and are not listed here.
Step S120, storing the parameters as a universal type object according to a preset parameter conversion template, and obtaining the universal type information corresponding to the universal type object.
Step S130, the general type information is transmitted to the parameter receiver, and the parameter receiver obtains the parameters according to the general type information.
Therefore, the parameter receiver only needs to receive one piece of general type information, and the design is simple; when the parameters are used, the parameters to be used are extracted from the general type object, so that the efficiency is high, and the safety of data use is ensured.
It can be seen that, in the method shown in fig. 1, after the parameters to be processed are obtained, the preset parameter conversion template is used to store the parameters as the generic type objects, and generic type information corresponding to the generic type objects is obtained, and when the parameters are used, the generic type information is transmitted to the parameter receiver, and the parameter receiver obtains the parameters according to the generic type information. The technical scheme has the advantages that any number of parameters of any type can be theoretically supported through the parameter conversion template, serialization and deserialization are not needed, and the method is safe and high in efficiency.
In an embodiment of the present invention, in the method, the preset parameter conversion template includes an empty parameter packaging base class and a derived class of the parameter packaging base class implemented according to a template; according to a preset parameter conversion template, storing the parameters as a universal type object, and obtaining the universal type information corresponding to the universal type object comprises the following steps: and generating a derived class object corresponding to the parameters according to the derived class structure, and obtaining a base class pointer corresponding to the derived class object.
That is, the original type of the parameter is type-erased, and the base class pointer assigned by the derived class object does not carry type information. Only one base class pointer is needed to be transmitted during parameter transmission, a derived class object is not needed to be transmitted, and parameters in the derived class object are obtained according to the base class pointer during parameter fetching.
In an embodiment of the present invention, the generating a derived class object corresponding to the parameters according to the derived class structure in the method includes: and packaging the parameters according to a parameter packaging method in the derived class. That is, regardless of the number of parameters, a derived class object can be obtained by wrapping.
Implementation of the parametric packaging method may be achieved through std:: tuple provided by C + + 11. That is, in an embodiment of the present invention, the wrapping the parameters according to the parameter wrapping method in the derived class in the method includes: and creating a tuple according to the variable parameter template in the parameter packaging method, and writing the parameters into the tuple.
For example, the parameter packing base class is CParaWrapper:
class CParaWrapper;
the derived class is CparaWrapperT:
template<typename...Args>
class CParaWrapperT:public CParaWrapper
{
std::tuple<Args...>m_tuple;
}
generating a derived class object during construction:
CParaWrapperT(Args2&&...args):m_tuple(std::forward<Args2>(args)...){}
the feature that the variable parameter template supports any type and any number of parameters is utilized.
In an embodiment of the present invention, the above method, wherein creating a tuple according to the variable parameter template in the parameter packing method includes: and determining the index information of the parameters in the tuple.
Here, since the base class pointer does not store parameters nor the type of parameters, all the information is recorded in the derived class object, and in order to be able to extract parameters without confusion, it is necessary to set an index information to specify that all the parameters are stored at each position.
For example, in an embodiment of the present invention, in the above method, the index information includes a write type of a parameter corresponding to each position in the tuple. Thus, when the parameter receiver needs to use the parameters, the parameters of the corresponding positions can be obtained according to the write-in type of the parameters corresponding to the positions in the tuple.
In an embodiment of the present invention, the generating a derived class object corresponding to the parameters according to the derived class structure in the method includes: when the number of the parameters to be processed is one, judging whether the type of the parameters belongs to a preset type; if so, storing the parameter in the memory space applied by the derived class, otherwise, applying for a new memory space for storing the parameter.
In practice, the number of parameters to be transmitted is fixed in many cases, but the type is not fixed, and in this case, only one parameter is transmitted. In the embodiment, the specialization is performed on the situation, and particularly, the space can be saved and the efficiency can be improved.
The preset type here may be a scalar type, a class type supporting right value construction, and a size not larger than 8 bytes (sizeof < ═ 8). When storing these types of parameters, the derived classes need to store a 4-byte virtual function table, a 4-byte base class pointer, and at most 8-byte parameters. However, the memory alignment is also considered, and the virtual function table and the base class pointer respectively need 4 bytes of space for memory alignment, which causes waste. Therefore, in an embodiment of the present invention, in the method, the memory space of the derived class application is sequentially divided into three areas, and the three areas are sequentially used for storing the virtual function table, the base class pointer and the parameter.
Here, for the preset type, the method of displacement new is used first, the parameters are stored in the allocated space, no additional application for a new memory space is required, and meanwhile, the memory space for the derived class application is divided into three regions in sequence, and the virtual function table, the base class pointer and the parameters are stored in sequence. Therefore, 8 bytes in total of the virtual function table and the base class pointer do not need to be aligned in a memory, and the space of 8 bytes is saved.
Thus, if the virtual function table is not empty, the method using the displacement new is described, the parameters are stored in the allocated space, and if the virtual function table is empty, the base class pointer is not empty, which means that the displacement new is not used, but the memory space is newly applied. If both are empty, no value is indicated.
In one embodiment of the present invention, in the method, the parameter receiver is an observer in the observer mode or a function to be executed. The observer mode is that an observer receives messages sent by multiple observers, the messages may include various parameters, and the parameters on which the function to be executed depends are also varied in demand.
Fig. 2 shows a schematic flow diagram of another parameter processing method according to an embodiment of the invention. As shown in fig. 2, the method includes:
step S210, obtaining general type information corresponding to a general type object, where the general type object stores a plurality of parameters.
Step S220, according to the general type information, the target parameter is taken out from the general type object according to the appointed type.
The method describes how to fetch the target parameter from the perspective of the parameter receiver. It can be seen that only one general type object still needs to be acquired, and the value can be taken according to the specified type, so that the method is flexible and convenient.
In an embodiment of the present invention, in the method, the generic type object is generated according to a preset parameter transformation template, where the preset parameter transformation template includes an empty parameter packaging base class and a derived class of the parameter packaging base class implemented according to a template; the generic type object is specifically a derived class object generated according to the derived class structure, and the generic type information is a base class pointer corresponding to the derived class. These are similar to the previous methods and are not described in detail herein.
In an embodiment of the present invention, in the method, the generic type object includes a tuple storing the parameters and index information of the tuple; according to the general type information, the target parameter is taken out from the general type object according to the appointed type, and the target parameter comprises the following steps: inheriting parameters in the derived classes to obtain virtual functions, and taking out corresponding parameters from the tuples according to the base class pointers and the index information.
In connection with the above example, at the time of storing the parameter, cparawrrapper:: New (11,22), parameters 11 and 22 are stored to derive the class object, and the base class pointer p is passed to the parameter receiver. When the parameter receiver takes out, int n ═ p- > GetValue < int > (0) can return to 11.
In an embodiment of the present invention, in the above method, the index information includes a writing type of a parameter corresponding to each position in the tuple; taking out corresponding parameters from the tuples according to the base class pointer and the index information comprises the following steps: and acquiring the parameters of the corresponding positions according to the write-in type of the parameters corresponding to the positions in the tuples.
In this example, what type of parameters are written in, and what type of parameters can be taken out, because the writing type of the parameters corresponding to each position is marked in the index information, actually, the parameters can be taken out more flexibly, for example, an int type parameter is stored, and a long type parameter can be taken out.
Therefore, in an embodiment of the present invention, in the method, acquiring the parameter at the corresponding location according to the write type of the parameter corresponding to each location in the tuple includes: determining a taking-out type matched with the writing type according to a preset fuzzy matching rule; taking out the parameters of the corresponding positions according to the matched taking-out type; in the fuzzy matching rule, one fetch type corresponds to one or more write types.
In addition, in addition to examples of int type and long type, CV of multi-level pointers can be removed, multi-dimensional arrays can be converted into multi-level pointers, and the like in the fuzzy matching rules.
Fig. 3 is a schematic structural diagram of a parameter processing apparatus according to an embodiment of the present invention. As shown in fig. 3, the parameter processing apparatus 300 includes:
the parameter obtaining unit 310 is adapted to obtain a number of parameters to be processed. In one embodiment of the present invention, in the above apparatus, the parameter includes one or more of: basic type objects, lambda expressions, pointers, intelligent pointers, and ordinary functions. There are many parameters that can be handled in practice and are not listed here.
The parameter processing unit 320 is adapted to store the parameters as a generic type object according to a preset parameter conversion template, so as to obtain generic type information corresponding to the generic type object.
The parameter passing unit 330 is adapted to pass the general type information to the parameter receiver, and the parameter receiver obtains the plurality of parameters according to the general type information.
Therefore, the parameter receiver only needs to receive one piece of general type information, and the design is simple; when the parameters are used, the parameters to be used are extracted from the general type object, so that the efficiency is high, and the safety of data use is ensured.
It can be seen that, in the apparatus shown in fig. 3, after the parameters to be processed are obtained, the preset parameter conversion template is used to store the parameters as the generic type objects, and generic type information corresponding to the generic type objects is obtained, and when the parameters are used, the generic type information is transmitted to the parameter receiver, and the parameter receiver obtains the parameters according to the generic type information. The technical scheme has the advantages that any number of parameters of any type can be theoretically supported through the parameter conversion template, serialization and deserialization are not needed, and the method is safe and high in efficiency.
In an embodiment of the present invention, in the apparatus, the preset parameter transformation template includes an empty parameter packaging base class and a derived class of the parameter packaging base class implemented according to a template; the parameter processing unit 320 is adapted to generate a derived class object corresponding to the parameters according to the derived class structure, and obtain a base class pointer corresponding to the derived class object.
That is, the original type of the parameter is type-erased, and the base class pointer assigned by the derived class object does not carry type information. Only one base class pointer is needed to be transmitted during parameter transmission, a derived class object is not needed to be transmitted, and parameters in the derived class object are obtained according to the base class pointer during parameter fetching.
In an embodiment of the present invention, in the above apparatus, the parameter processing unit 320 is adapted to package the parameters according to a parameter packaging method in the derived class.
That is, regardless of the number of parameters, a derived class object can be obtained by wrapping.
Implementation of the parametric packaging method may be achieved through std:: tuple provided by C + + 11. That is, in one embodiment of the present invention, in the above apparatus, the parameter processing unit 320 is adapted to create a tuple according to the variable parameter template in the parameter packing method, and write the parameters into the tuple.
For example, the parameter packing base class is CParaWrapper:
class CParaWrapper;
the derived class is CparaWrapperT:
template<typename...Args>
class CParaWrapperT:public CParaWrapper
{
std::tuple<Args...>m_tuple;
}
generating a derived class object during construction:
CParaWrapperT(Args2&&...args):m_tuple(std::forward<Args2>(args)...){}
the feature that the variable parameter template supports any type and any number of parameters is utilized.
In an embodiment of the present invention, in the above apparatus, the parameter processing unit 320 is adapted to determine index information of the parameters in the tuple.
Here, since the base class pointer does not store parameters nor the type of parameters, all the information is recorded in the derived class object, and in order to be able to extract parameters without confusion, it is necessary to set an index information to specify that all the parameters are stored at each position.
For example, in an embodiment of the present invention, in the apparatus, the index information includes a write type of a parameter corresponding to each position in the tuple. Thus, when the parameter receiver needs to use the parameters, the parameters of the corresponding positions can be obtained according to the write-in type of the parameters corresponding to the positions in the tuple.
In an embodiment of the present invention, in the above apparatus, the parameter processing unit 320 is adapted to determine whether the type of the parameter belongs to a preset type when the number of the parameters to be processed is one; if so, storing the parameter in the memory space applied by the derived class, otherwise, applying for a new memory space for storing the parameter.
In practice, the number of parameters to be transmitted is fixed in many cases, but the type is not fixed, and in this case, only one parameter is transmitted. In the embodiment, the specialization is performed on the situation, and particularly, the space can be saved and the efficiency can be improved.
The preset type here may be a scalar type, a class type supporting right value construction, and a size not larger than 8 bytes (sizeof < ═ 8). When storing these types of parameters, the derived classes need to store a 4-byte virtual function table, a 4-byte base class pointer, and at most 8-byte parameters. However, the memory alignment is also considered, and the virtual function table and the base class pointer respectively need 4 bytes of space for memory alignment, which causes waste. Therefore, in an embodiment of the present invention, in the above apparatus, the memory space of the derived class application is sequentially divided into three areas, and the three areas are sequentially used for storing the virtual function table, the base class pointer and the parameter.
Here, for the preset type, the method of displacement new is used first, the parameters are stored in the allocated space, no additional application for a new memory space is required, and meanwhile, the memory space for the derived class application is divided into three regions in sequence, and the virtual function table, the base class pointer and the parameters are stored in sequence. Therefore, 8 bytes in total of the virtual function table and the base class pointer do not need to be aligned in a memory, and the space of 8 bytes is saved.
Thus, if the virtual function table is not empty, the method using the displacement new is described, the parameters are stored in the allocated space, and if the virtual function table is empty, the base class pointer is not empty, which means that the displacement new is not used, but the memory space is newly applied. If both are empty, no value is indicated.
In an embodiment of the present invention, in the above apparatus, the parameter receiver is an observer in the observer mode or a function to be executed. The observer mode is that an observer receives messages sent by multiple observers, the messages may include various parameters, and the parameters on which the function to be executed depends are also varied in demand.
Fig. 4 is a schematic structural diagram of a parameter processing apparatus according to an embodiment of the present invention. As shown in fig. 4, the parameter processing apparatus 400 includes:
the general type information obtaining unit 410 is adapted to obtain general type information corresponding to a general type object, where the general type object stores a number of parameters.
The parameter extracting unit 420 is adapted to extract the target parameter from the generic type object according to the generic type information and the specified type.
It is described here from the perspective of the parameter receiver how to fetch the target parameter. It can be seen that only one general type object still needs to be acquired, and the value can be taken according to the specified type, so that the method is flexible and convenient.
In an embodiment of the present invention, in the apparatus, the generic type object is generated according to a preset parameter transformation template, where the preset parameter transformation template includes an empty parameter packaging base class and a derived class of the parameter packaging base class implemented according to a template; the generic type object is specifically a derived class object generated according to the derived class structure, and the generic type information is a base class pointer corresponding to the derived class. These are similar to the previous embodiments and will not be described herein.
In an embodiment of the present invention, in the above apparatus, the generic type object includes a tuple storing the parameters and index information of the tuple; the parameter extracting unit 420 is adapted to inherit the parameters in the derived classes to obtain the dummy functions, and extract the corresponding parameters from the tuples according to the base class pointer and the index information.
In connection with the above example, at the time of storing the parameter, cparawrrapper:: New (11,22), parameters 11 and 22 are stored to derive the class object, and the base class pointer p is passed to the parameter receiver. When the parameter receiver takes out, int n ═ p- > GetValue < int > (0) can return to 11.
In an embodiment of the present invention, in the apparatus, the index information includes a writing type of a parameter corresponding to each position in the tuple; the parameter extracting unit 420 is adapted to obtain the parameters of the corresponding positions according to the write-in type of the parameters corresponding to each position in the tuple.
In this example, what type of parameters are written in, and what type of parameters can be taken out, because the writing type of the parameters corresponding to each position is marked in the index information, actually, the parameters can be taken out more flexibly, for example, an int type parameter is stored, and a long type parameter can be taken out.
Therefore, in an embodiment of the present invention, in the above apparatus, the parameter extracting unit 420 is adapted to determine, according to a preset fuzzy matching rule, a fetching type matched with the writing type; taking out the parameters of the corresponding positions according to the matched taking-out type; in the fuzzy matching rule, one fetch type corresponds to one or more write types.
In addition, in addition to examples of int type and long type, CV of multi-level pointers can be removed, multi-dimensional arrays can be converted into multi-level pointers, and the like in the fuzzy matching rules.
In summary, according to the technical solution of the present invention, after the parameters to be processed are obtained, the preset parameter conversion template is used to store the parameters as the generic type object, and generic type information corresponding to the generic type object is obtained, and when the parameters are used, the generic type information is transmitted to the parameter receiver, and the parameter receiver obtains the parameters according to the generic type information. The technical scheme has the advantages that any number of parameters of any type can be theoretically supported through the parameter conversion template, serialization and deserialization are not needed, and the method is safe and high in efficiency.
It should be noted that:
the algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose devices may be used with the teachings herein. The required structure for constructing such a device will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in a parameter processing apparatus according to an embodiment of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
For example, fig. 5 shows a schematic structural diagram of an intelligent terminal according to an embodiment of the present invention. The intelligent terminal comprises a processor 510 and a memory 520 arranged to store computer executable instructions (computer readable program code). The memory 520 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. The memory 520 has a storage space 530 storing computer readable program code 531 for performing any of the method steps in the above described method. For example, the storage space 530 for storing the computer readable program code may include respective computer readable program codes 531 for respectively implementing various steps in the above method. The computer readable program code 531 may be read from or written to one or more computer program products. These computer program products comprise a program code carrier such as a hard disk, a Compact Disc (CD), a memory card or a floppy disk. Such a computer program product is typically a computer readable storage medium such as described in fig. 6. Fig. 6 shows a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention. The computer readable storage medium 600 stores computer readable program code 531 for performing the steps of the method according to the present invention, which is readable by the processor 510 of the smart terminal 500, and when the computer readable program code 531 is executed by the smart terminal 500, causes the smart terminal 500 to perform the steps of the method described above, and in particular, the computer readable program code 531 stored by the computer readable storage medium may perform the method shown in any of the embodiments described above. The computer readable program code 531 may be compressed in a suitable form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The embodiment of the invention discloses A1 and a parameter processing method, which comprises the following steps:
acquiring a plurality of parameters to be processed;
storing the parameters into a universal type object according to a preset parameter conversion template to obtain universal type information corresponding to the universal type object;
and transmitting the general type information to a parameter receiver, and acquiring the parameters by the parameter receiver according to the general type information.
A2, the method of A1, wherein the parameters include one or more of:
basic type objects, lambda expressions, pointers, intelligent pointers, and ordinary functions.
A3, the method according to A1, wherein the preset parameter transformation template includes an empty parameter packing base class and a derived class of the parameter packing base class implemented according to a template;
the step of storing the parameters as a general type object according to a preset parameter conversion template to obtain general type information corresponding to the general type object comprises the following steps:
and generating a derived class object corresponding to the parameters according to the derived class structure to obtain a base class pointer corresponding to the derived class object.
A4, the method as in A3, wherein the generating the derived class object corresponding to the parameters according to the derived class configuration comprises:
and packaging the parameters according to the parameter packaging method in the derived class.
A5, the method as in a4, wherein the packaging the parameters according to the parameter packaging method in the derived class comprises:
and creating a tuple according to the variable parameter template in the parameter packaging method, and writing the parameters into the tuple.
A6, the method as in a5, wherein the creating a tuple according to the variable parameter template in the parameter packing method comprises: determining the index information of the parameters in the tuple.
A7, the method as in A6, wherein the index information includes writing type of parameters corresponding to each position in the tuple.
A8, the method as in A3, wherein the generating the derived class object corresponding to the parameters according to the derived class configuration comprises:
when the number of the parameters to be processed is one, judging whether the type of the parameters belongs to a preset type;
if yes, storing the parameter in the memory space applied by the derived class, otherwise, applying a new memory space for storing the parameter.
A9, the method as in A8, wherein the memory space of the derived class application is divided into three areas in sequence, and the three areas are used for storing the virtual function table, the base class pointer and the parameter in sequence.
A10, the method according to any of A1-A9, wherein the parameter receiver is an observer in observer mode or a function to be executed.
The embodiment of the invention also discloses B11 and a parameter processing method, which comprises the following steps:
acquiring general type information corresponding to a general type object, wherein the general type object stores a plurality of parameters;
and according to the general type information, taking out the target parameters from the general type object according to the specified type.
B12, the method according to B11, wherein the generic type object is generated according to a preset parameter conversion template, the preset parameter conversion template comprises an empty parameter packaging base class and a derived class of the parameter packaging base class realized according to a template;
the generic type object is specifically a derived class object generated according to the derived class structure, and the generic type information is a base class pointer corresponding to the derived class.
B13, the method according to B12, wherein the generic type object includes a tuple storing the several parameters and index information of the tuple;
the step of taking out the target parameters from the general type object according to the specified type according to the general type information comprises the following steps: inheriting the parameters in the derived classes to obtain virtual functions, and taking out corresponding parameters from the tuples according to the base class pointers and the index information.
B14, the method according to B13, wherein the index information includes writing type of parameters corresponding to each position in the tuple;
the extracting the corresponding parameter from the tuple according to the base class pointer and the index information includes: and acquiring the parameters of the corresponding positions according to the write-in type of the parameters corresponding to the positions in the tuple.
B15, the method according to B14, wherein the obtaining the parameter at the corresponding location according to the write type of the parameter corresponding to the location in the tuple includes:
determining a taking-out type matched with the writing type according to a preset fuzzy matching rule;
taking out the parameters of the corresponding positions according to the matched taking-out type;
in the fuzzy matching rule, one fetch type corresponds to one or more write types.
The embodiment of the invention also discloses C16 and a parameter processing device, which comprises:
the parameter acquisition unit is suitable for acquiring a plurality of parameters to be processed;
the parameter processing unit is suitable for converting the template according to the preset parameters, storing the parameters as a universal type object and obtaining the universal type information corresponding to the universal type object;
and the parameter transmitting unit is suitable for transmitting the general type information to a parameter receiver, and the parameter receiver acquires the parameters according to the general type information.
C17, the apparatus of C16, wherein the parameters include one or more of:
basic type objects, lambda expressions, pointers, intelligent pointers, and ordinary functions.
C18, the apparatus according to C16, wherein the preset parameter transformation template includes an empty parameter packing base class and a derived class of the parameter packing base class implemented according to the template;
and the parameter processing unit is suitable for generating a derived class object corresponding to the parameters according to the derived class structure to obtain a base class pointer corresponding to the derived class object.
C19, the device of C18, wherein,
the parameter processing unit is suitable for packaging the parameters according to the parameter packaging method in the derived class.
C20, the device of C19, wherein,
the parameter processing unit is suitable for creating a tuple according to the variable parameter template in the parameter packaging method and writing the parameters into the tuple.
C21, the device of C20, wherein,
the parameter processing unit is adapted to determine index information of the plurality of parameters in the tuple.
C22, the apparatus as in C21, wherein the index information includes a write type of parameters corresponding to each position in the tuple.
C23, the device of C18, wherein,
the parameter processing unit is suitable for judging whether the type of the parameter belongs to a preset type when the number of the parameters to be processed is one; if yes, storing the parameter in the memory space applied by the derived class, otherwise, applying a new memory space for storing the parameter.
C24, the apparatus according to C23, wherein the memory space of the derived class application is sequentially divided into three areas, and the three areas are sequentially used for storing the virtual function table, the base class pointer and the parameter.
C25, the apparatus according to any of C16-C24, wherein the parameter receiver is an observer in observer mode or a function to be executed.
The embodiment of the invention also discloses D26 and a parameter processing device, which comprises:
the device comprises a general type information acquisition unit, a data processing unit and a data processing unit, wherein the general type information acquisition unit is suitable for acquiring general type information corresponding to a general type object, and the general type object stores a plurality of parameters;
and the parameter extraction unit is suitable for extracting the target parameters from the general type object according to the general type information and the specified type.
D27, the apparatus according to D26, wherein the generic type object is generated according to a preset parameter transformation template, and the preset parameter transformation template includes an empty parameter packing base class and a derived class of the parameter packing base class implemented according to a template;
the generic type object is specifically a derived class object generated according to the derived class structure, and the generic type information is a base class pointer corresponding to the derived class.
D28, the apparatus as D27, wherein the generic type object includes a tuple storing the number of parameters and index information of the tuple;
the parameter extraction unit is suitable for inheriting the parameters in the derived classes to obtain the virtual functions and extracting corresponding parameters from the tuples according to the base class pointers and the index information.
D29, the apparatus as D28, wherein the index information includes a writing type of parameters corresponding to each position in the tuple;
and the parameter extraction unit is suitable for acquiring the parameters of the corresponding positions according to the write-in type of the parameters corresponding to each position in the tuple.
D30, the device of D29, wherein,
the parameter extraction unit is suitable for determining a taking-out type matched with the writing type according to a preset fuzzy matching rule; taking out the parameters of the corresponding positions according to the matched taking-out type; in the fuzzy matching rule, one fetch type corresponds to one or more write types.
The embodiment of the invention also discloses E31 and an intelligent terminal, wherein the intelligent terminal comprises: a processor; and a memory arranged to store computer executable instructions that, when executed, cause the processor to perform a method as any one of a1-a10 or a method as any one of B11-B15.
Embodiments of the present invention also disclose F32, a computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method as described in any of a1-a10 or implement the method as described in any of a11-a 15.

Claims (28)

1. A method of parameter processing, comprising:
acquiring a plurality of parameters to be processed;
storing the parameters into a universal type object according to a preset parameter conversion template to obtain universal type information corresponding to the universal type object;
the general type information is transmitted to a parameter receiver, and the parameter receiver acquires the parameters according to the general type information;
the preset parameter conversion template comprises an empty parameter packaging base class and a derived class of the parameter packaging base class, wherein the derived class of the parameter packaging base class is realized according to the template;
the step of storing the parameters as a general type object according to a preset parameter conversion template to obtain general type information corresponding to the general type object comprises the following steps:
and generating a derived class object corresponding to the parameters according to the derived class structure to obtain a base class pointer corresponding to the derived class object.
2. The method of claim 1, wherein the parameters include one or more of:
basic type objects, lambda expressions, pointers, intelligent pointers, and ordinary functions.
3. The method of claim 1, wherein said generating a derived class object corresponding to the number of parameters from the derived class construct comprises:
and packaging the parameters according to the parameter packaging method in the derived class.
4. The method of claim 3, wherein said wrapping the plurality of parameters according to the parameter wrapping method in the derived class comprises:
and creating a tuple according to the variable parameter template in the parameter packaging method, and writing the parameters into the tuple.
5. The method of claim 4, wherein the creating a tuple based on the variable parameter template in the parameter packing method comprises: determining the index information of the parameters in the tuple.
6. The method of claim 5, wherein the index information comprises a write type of a parameter corresponding to each location in the tuple.
7. The method of claim 1, wherein said generating a derived class object corresponding to the number of parameters from the derived class construct comprises:
when the number of the parameters to be processed is one, judging whether the type of the parameters belongs to a preset type;
if yes, storing the parameter in the memory space applied by the derived class, otherwise, applying a new memory space for storing the parameter.
8. The method of claim 7, wherein the memory space of the derived class application is sequentially divided into three regions, in order for storing the virtual function table, the base class pointer, and the parameter.
9. The method of any one of claims 1-8, wherein the parameter recipient is an observer in an observer mode or a function to be performed.
10. A method of parameter processing, comprising:
acquiring general type information corresponding to a general type object, wherein the general type object stores a plurality of parameters;
according to the general type information, taking out target parameters from the general type object according to the specified type;
the general type object is generated according to a preset parameter conversion template, and the preset parameter conversion template comprises an empty parameter packaging base class and a derived class of the parameter packaging base class realized according to a template;
the generic type object is specifically a derived class object generated according to the derived class structure, and the generic type information is a base class pointer corresponding to the derived class.
11. The method of claim 10, wherein the generic type object includes a tuple storing the number of parameters and index information of the tuple;
the step of taking out the target parameters from the general type object according to the specified type according to the general type information comprises the following steps: inheriting the parameters in the derived classes to obtain virtual functions, and taking out corresponding parameters from the tuples according to the base class pointers and the index information.
12. The method of claim 11, wherein the index information includes a write type of a parameter corresponding to each location in the tuple;
the extracting the corresponding parameter from the tuple according to the base class pointer and the index information includes: and acquiring the parameters of the corresponding positions according to the write-in type of the parameters corresponding to the positions in the tuple.
13. The method of claim 12, wherein the obtaining the parameters of the corresponding location according to the write type of the parameters corresponding to the location in the tuple comprises:
determining a taking-out type matched with the writing type according to a preset fuzzy matching rule;
taking out the parameters of the corresponding positions according to the matched taking-out type;
in the fuzzy matching rule, one fetch type corresponds to one or more write types.
14. A parameter processing apparatus comprising:
the parameter acquisition unit is suitable for acquiring a plurality of parameters to be processed;
the parameter processing unit is suitable for converting the template according to the preset parameters, storing the parameters as a universal type object and obtaining the universal type information corresponding to the universal type object;
the parameter transmitting unit is suitable for transmitting the general type information to a parameter receiver, and the parameter receiver acquires the parameters according to the general type information;
the preset parameter conversion template comprises an empty parameter packaging base class and a derived class of the parameter packaging base class, wherein the derived class of the parameter packaging base class is realized according to the template;
and the parameter processing unit is suitable for generating a derived class object corresponding to the parameters according to the derived class structure to obtain a base class pointer corresponding to the derived class object.
15. The apparatus of claim 14, wherein the parameters comprise one or more of:
basic type objects, lambda expressions, pointers, intelligent pointers, and ordinary functions.
16. The apparatus of claim 15, wherein,
the parameter processing unit is suitable for packaging the parameters according to the parameter packaging method in the derived class.
17. The apparatus of claim 16, wherein,
the parameter processing unit is suitable for creating a tuple according to the variable parameter template in the parameter packaging method and writing the parameters into the tuple.
18. The apparatus of claim 17, wherein,
the parameter processing unit is adapted to determine index information of the plurality of parameters in the tuple.
19. The apparatus of claim 18, wherein the index information comprises a write type of a parameter corresponding to each location in the tuple.
20. The apparatus of claim 15, wherein,
the parameter processing unit is suitable for judging whether the type of the parameter belongs to a preset type when the number of the parameters to be processed is one; if yes, storing the parameter in the memory space applied by the derived class, otherwise, applying a new memory space for storing the parameter.
21. The apparatus of claim 20, wherein the memory space of the derived class application is sequentially divided into three regions, one for storing the virtual function table, the base class pointer, and the parameter.
22. The apparatus of any of claims 14-21, wherein the parameter receiver is an observer in an observer mode or a function to be performed.
23. A parameter processing apparatus comprising:
the device comprises a general type information acquisition unit, a data processing unit and a data processing unit, wherein the general type information acquisition unit is suitable for acquiring general type information corresponding to a general type object, and the general type object stores a plurality of parameters;
the parameter extraction unit is suitable for extracting target parameters from the general type object according to the general type information and the specified type;
the general type object is generated according to a preset parameter conversion template, and the preset parameter conversion template comprises an empty parameter packaging base class and a derived class of the parameter packaging base class realized according to a template;
the generic type object is specifically a derived class object generated according to the derived class structure, and the generic type information is a base class pointer corresponding to the derived class.
24. The apparatus of claim 23, wherein the generic type object includes a tuple storing the number of parameters and index information of the tuple;
the parameter extraction unit is suitable for inheriting the parameters in the derived classes to obtain the virtual functions and extracting corresponding parameters from the tuples according to the base class pointers and the index information.
25. The apparatus of claim 24, wherein the index information comprises a write type of a parameter corresponding to each location in the tuple;
and the parameter extraction unit is suitable for acquiring the parameters of the corresponding positions according to the write-in type of the parameters corresponding to each position in the tuple.
26. The apparatus of claim 25, wherein,
the parameter extraction unit is suitable for determining a taking-out type matched with the writing type according to a preset fuzzy matching rule; taking out the parameters of the corresponding positions according to the matched taking-out type; in the fuzzy matching rule, one fetch type corresponds to one or more write types.
27. An intelligent terminal, wherein, this intelligent terminal includes: a processor; and a memory arranged to store computer-executable instructions that, when executed, cause the processor to perform the method of any of claims 1-9 or to perform the method of any of claims 10-13.
28. A computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any of claims 1-9 or the method of any of claims 10-13.
CN201810646530.1A 2018-06-21 2018-06-21 Parameter processing method and device Active CN108932123B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810646530.1A CN108932123B (en) 2018-06-21 2018-06-21 Parameter processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810646530.1A CN108932123B (en) 2018-06-21 2018-06-21 Parameter processing method and device

Publications (2)

Publication Number Publication Date
CN108932123A CN108932123A (en) 2018-12-04
CN108932123B true CN108932123B (en) 2022-03-11

Family

ID=64446846

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810646530.1A Active CN108932123B (en) 2018-06-21 2018-06-21 Parameter processing method and device

Country Status (1)

Country Link
CN (1) CN108932123B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111610943B (en) * 2020-06-11 2023-05-02 上海乾臻信息科技有限公司 Method, device and system for managing and using face sheet template
CN112306472A (en) * 2020-10-27 2021-02-02 深圳市元征科技股份有限公司 Program interface parameter transmission method, system and related equipment
CN113971019B (en) * 2021-10-19 2024-10-18 深圳市元征科技股份有限公司 Data type creation method, device, server and medium
CN116400988B (en) * 2023-06-08 2023-08-11 中航信移动科技有限公司 Target parameter returning method, storage medium and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7010615B1 (en) * 1999-11-12 2006-03-07 Fujitsu Limited Communication network management system for automatically converting action parameters to network technology dependent parameters using a selected conversion rule conforming to a network technology
CN102981884A (en) * 2012-11-22 2013-03-20 用友软件股份有限公司 Serializing device and serializing method
CN103677790A (en) * 2012-09-26 2014-03-26 腾讯科技(深圳)有限公司 Software function modifying method
CN103914304A (en) * 2014-04-10 2014-07-09 国家电网公司 Method for converting different structure type parameters on basis of SAP (service access point) platforms
CN106775638A (en) * 2016-11-22 2017-05-31 北京皮尔布莱尼软件有限公司 A kind of object serialization method, device and computing device
CN107463668A (en) * 2017-08-02 2017-12-12 湖南新航动力信息科技有限公司 Serializing and method and device, computer equipment and the storage medium of unserializing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008165340A (en) * 2006-12-27 2008-07-17 Fujitsu Ltd Remote procedure calling system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7010615B1 (en) * 1999-11-12 2006-03-07 Fujitsu Limited Communication network management system for automatically converting action parameters to network technology dependent parameters using a selected conversion rule conforming to a network technology
CN103677790A (en) * 2012-09-26 2014-03-26 腾讯科技(深圳)有限公司 Software function modifying method
CN102981884A (en) * 2012-11-22 2013-03-20 用友软件股份有限公司 Serializing device and serializing method
CN103914304A (en) * 2014-04-10 2014-07-09 国家电网公司 Method for converting different structure type parameters on basis of SAP (service access point) platforms
CN106775638A (en) * 2016-11-22 2017-05-31 北京皮尔布莱尼软件有限公司 A kind of object serialization method, device and computing device
CN107463668A (en) * 2017-08-02 2017-12-12 湖南新航动力信息科技有限公司 Serializing and method and device, computer equipment and the storage medium of unserializing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王朋等.O'Caml泛型编程中"泛型抽象"的研究.《计算机技术与发展》.2013,(第07期), *

Also Published As

Publication number Publication date
CN108932123A (en) 2018-12-04

Similar Documents

Publication Publication Date Title
CN108932123B (en) Parameter processing method and device
CN110162296B (en) Method and device for generating application programming interface document and terminal equipment
CN106843842B (en) Method and device for updating application program configuration file
CN107608750A (en) Counter operation in state machine lattice
EP2751675A1 (en) Describing native application programming interfaces of an operating system with metadata
CN107153535B (en) Method and device for operating elastic search
CN107679208A (en) A kind of searching method of picture, terminal device and storage medium
WO2018040270A1 (en) Method and device for loading linux-system elf file in windows system
CN110069259B (en) ID L file-based parsing method and device, electronic equipment and storage medium
CN107590291A (en) A kind of searching method of picture, terminal device and storage medium
CN107797805B (en) Code packaging method and device and computer readable storage medium
CN112181411A (en) Menu generation method, menu generation device and diagnosis equipment
CN107766036B (en) Module construction method and device and terminal equipment
JP2006216027A (en) Mechanism for transferring raw data from one data structure to another representing the same item
CN113434582B (en) Service data processing method and device, computer equipment and storage medium
CN111580881B (en) File loading method and device and electronic equipment
Hmelnov et al. Generation of code for reading data from the declarative file format specifications written in language FlexT
CN109542447B (en) OTX program file execution method and device
US8661425B1 (en) Method, apparatus, and computer-readable medium for storing data associated with a firmware program
CN106708516B (en) Method and device for calling external function by SO file
EP3404839A1 (en) Encoding program, encoding device, and encoding method
CN107423084B (en) Program modification method and device
CN104899316A (en) Game data serialization and deserialization processing method and device
CN110764777B (en) ELF file generation method, ELF file, equipment and storage medium
CN105138342B (en) A kind of service development method and apparatus

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