Service code interpretation weaving method, service system and storage medium
AssigneesChongqing BOE Intelligent Technology Co., Ltd., Boe Technology Group Co., Ltd.
InventorXiaping Shen
Life of this patent
Estimating the term…
Abstract
The present disclosure provides a service code interpretation weaving method, including: acquiring an entity class object generated by a background service module; and calling a customized serializer to perform an interpretation mapping on a code field value of a preset service code field in the entity class object, to obtain a code interpretation value corresponding to the code field value, and adding the code interpretation value to the entity class object. The present disclosure further provides a service system and a computer-readable storage medium.
Claims13
A service code interpretation weaving method, comprising:
- acquiring an entity class object generated by a background service module;
- and
- calling a customized serializer to perform an interpretation mapping on a code field value of a preset service code field in the entity class object, to obtain a code interpretation value corresponding to the code field value, and adding the code interpretation value to the entity class object,
- wherein the performing the interpretation mapping on the code field value of the preset service code field comprises:
- acquiring the code interpretation value corresponding to the code field value according to pre-stored mapping data, wherein the mapping data comprise different code field values and code interpretation values corresponding to the code field values,
- wherein before the performing the interpretation mapping on the code field value of the preset service code field, the method further comprises:
- acquiring the mapping data from a storage server, and storing the mapping data in a cache,
- wherein the acquiring the code interpretation value corresponding to the code field value according to the pre-stored mapping data comprises:
- acquiring the code interpretation value corresponding to the code field value according to the mapping data stored in the cache,
- wherein the acquiring the mapping data from the storage server comprises:
- acquiring a total number of pieces of correspondence data in the mapping data stored in the storage server, wherein one piece of correspondence data comprises one code field value and a code interpretation value corresponding to the code field value;
- generating a plurality of data acquisition tasks according to the total number of pieces of the correspondence data;
- allocating the plurality of data acquisition tasks to a plurality of slave processing units, respectively, so that each slave processing unit acquires correspondence data corresponding to a received data acquisition task from the storage server according to the received data acquisition task;
- and
- receiving the correspondence data returned by each slave processing unit, and summarizing the correspondence data to obtain the mapping data.
A service system, comprising:
- a background service module and a serialization module, wherein the background service module is configured with a service data acquisition interface, and the serialization module comprises an interception calling unit and a customized serializer;
- the service data acquisition interface is configured to generate a corresponding entity class object in response to a service data calling request;
- the interception calling unit is configured to acquire the entity class object generated by the background service module;
- and
- the customized serializer is configured to perform an interpretation mapping on a code field value of a preset service code field in the entity class object, to obtain a code interpretation value corresponding to the code field value, and add the code interpretation value to the entity class object,
- wherein the customized serializer comprises:
- an acquisition unit configured to acquire the code field value of the preset service code field;
- a mapping unit configured to perform the interpretation mapping on the code field value to obtain the code interpretation value corresponding to the code field value;
- and
- an adding unit configured to add the code interpretation value to the entity class object,
- wherein the mapping unit is configured to acquire the code interpretation value corresponding to the code field value according to pre-stored mapping data, wherein the mapping data comprise different code field values and code interpretation values corresponding to the code field values,
- wherein the service system further comprises:
- a maintenance module, wherein the maintenance module comprises:
- a data synchronization unit;
- and
- the data synchronization unit is configured to acquire the mapping data from a storage server and store the mapping data in the cache,
- wherein the data synchronization unit comprises:
- a main processing unit and a plurality of slave processing units;
- the main processing unit comprises:
- an acquisition sub-unit configured to acquire a total number of pieces of correspondence data in the mapping data stored in the storage server, wherein one piece of correspondence data comprises one code field value and a code interpretation value corresponding to the code field value;
- a generation sub-unit configured to generate a plurality of data acquisition tasks according to the total number of pieces of the correspondence data;
- an allocation sub-unit configured to allocate the plurality of data acquisition tasks to the plurality of slave processing units, respectively;
- and
- a summarizing sub-unit configured to receive the correspondence data returned by each slave processing unit, and summarize the correspondence data to obtain the mapping data;
- and
- each slave processing unit is configured to acquire the correspondence data corresponding to a received data acquisition task from the storage server according to the received data acquisition task, and feed back the acquired correspondence data to the main processing unit.
Dependencies are inferred from the claim text.