The present application relates to a method for generating communication
data processing code, a
computer device and a medium, including: obtaining the interface information of an RPC function; recursively extracting the first named structures associated with the input and output of the RPC function and removing duplicates based on the interface information; generating a Request
structure based on the input of the RPC function, and generating a Response
structure based on the output of the RPC function; obtaining a
package associated with the first named structure, the Request structure and the Response structure; if the
package lacks a cache file or the cache file is updated, determining the corresponding target structure set based on the several second named structures included in each
package; sorting the second named structures in the target structure set respectively to obtain a sorted
list of target structures corresponding to the package; and generating the target code corresponding to the package in sequence based on the sorted
list of target structures. The code for
serialization and deserialization generated based on the solution provided by the present application has greatly
improved performance compared to traditional reflection solutions.