CN-122018964-A - Data processing method, apparatus, device, storage medium, and program product
Abstract
The embodiment of the application provides a data processing method, a device, electronic equipment, a computer storage medium and a computer program product, wherein the method is applied to a service calling end of a micro-service architecture, and comprises the steps of obtaining description information of each attribute in a first parameter class when running error occurs, enabling the first parameter class to represent a self-defined interface parameter class, determining description information of a change attribute corresponding to the first parameter class according to the description information of each attribute under the condition that a data structure of the first parameter class is determined to change, obtaining an attribute analysis template of the first parameter class, and adjusting the attribute analysis template according to the description information of the change attribute.
Inventors
- YANG PAN
- LI ZHEN
- Yao Zaiyi
Assignees
- 北京京东远升科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20241111
Claims (11)
- 1. A data processing method, applied to a service calling end of a micro service architecture, the method comprising: When running error occurs, acquiring description information of each attribute in a first parameter class, wherein the first parameter class characterizes a self-defined interface parameter class; According to the description information of each attribute, under the condition that the data structure of the first parameter class is determined to be changed, determining the description information of the changed attribute corresponding to the first parameter class; and acquiring an attribute analysis template of the first parameter class, and adjusting the attribute analysis template according to the description information of the changed attribute.
- 2. The method of claim 1, wherein adjusting the attribute resolution template based on the description information of the changed attribute comprises: when the changed attribute is a new attribute, determining a target position of the changed attribute in the attribute analysis template according to the position information of the changed attribute in the first parameter class; And inserting the description information of the change attribute into the target position.
- 3. The method of claim 2, wherein the inserting the description information of the change attribute into the target location comprises: Acquiring an attribute identifier correspondingly set for the new attribute, wherein the attribute identifier characterizes the new attribute to be ignored in the analysis process; and inserting the description information of the change attribute and the attribute identification into the target position.
- 4. The method of claim 1, wherein adjusting the attribute resolution template based on the description information of the changed attribute comprises: And deleting the description information of the changed attribute from the attribute analysis template when the changed attribute is a deletion attribute.
- 5. The method of claim 1, wherein adjusting the attribute resolution template based on the description information of the changed attribute comprises: determining description information of an initial attribute to be replaced from the attribute analysis template under the condition that the changed attribute is a replacement attribute; And updating the description information of the initial attribute into the description information of the changed attribute.
- 6. The method of claim 1, wherein the determining, based on the description information of the respective attributes, that the data structure of the first parameter class changes, further comprises: Comparing the description information of each attribute in the first parameter class with the description information of each attribute in a second parameter class to obtain a comparison result, wherein the second parameter class and the first parameter class are the same parameter class acquired by the service calling terminal at different moments, and the acquisition moment of the second parameter class is earlier than the acquisition moment of the first parameter class; And under the condition that the comparison result represents that the description information of each attribute in the first parameter class is inconsistent with the description information of each attribute in the second parameter class, determining that the data structure of the first parameter class is changed.
- 7. The method of claim 1, wherein after adjusting the attribute resolution template, the method further comprises: acquiring monitoring data or log data of the changed attribute; And generating operation and maintenance reminding information aiming at the changed attribute according to the monitoring data or the log data.
- 8. A data processing apparatus for use in a service invocation of a micro-service architecture, the apparatus comprising: The system comprises an acquisition module, a first parameter class and a second parameter class, wherein the acquisition module is used for acquiring the description information of each attribute in the first parameter class when the operation report is wrong; The determining module is used for determining the description information of the changed attribute corresponding to the first parameter class under the condition that the data structure of the first parameter class is determined to be changed according to the description information of each attribute; And the adjustment module is used for acquiring an attribute analysis template of the first parameter class and adjusting the attribute analysis template according to the description information of the changed attribute.
- 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any one of claims 1 to 7 when the program is executed.
- 10. A computer storage medium having stored thereon a computer program, which when executed by a processor implements the method of any of claims 1 to 7.
- 11. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the method of any of claims 1 to 7.
Description
Data processing method, apparatus, device, storage medium, and program product Technical Field The present application relates to the field of computer technology, and in particular, to a data processing method, apparatus, electronic device, computer storage medium, and computer program product. Background The micro-service architecture is a new technology for deploying applications and services in the cloud, MESSAGEPACK is an efficient binary serialization format, and is widely applied to data interaction in the micro-service architecture due to the efficient serialization performance and compact data format. In the related art, the problem that when MESSAGEPACK is used for data interaction, firstly, in order to keep the stability of calling among services, new parameter class attributes can only be added to the tail end of an original parameter class, so that the parameter class becomes larger and larger, the operation and maintenance cost is high, and the readability is poor, and secondly, when the parameter class is reconstructed, for example, the parameter class attributes are deleted or modified, the coordination of a service calling end is required to be completed, and the processing efficiency is low. Disclosure of Invention In view of the above, embodiments of the present application have been developed to provide a data processing method, apparatus, electronic device, computer storage medium, and computer program product that overcome, or at least partially solve, the above-described problems. The technical scheme of the application is realized as follows: The embodiment of the application provides a data processing method which is applied to a service calling end of a micro-service architecture, and comprises the following steps: When running error occurs, acquiring description information of each attribute in a first parameter class, wherein the first parameter class characterizes a self-defined interface parameter class; According to the description information of each attribute, under the condition that the data structure of the first parameter class is determined to be changed, determining the description information of the changed attribute corresponding to the first parameter class; and acquiring an attribute analysis template of the first parameter class, and adjusting the attribute analysis template according to the description information of the changed attribute. The embodiment of the application also provides a data processing device which is applied to the service calling end of the micro-service architecture, and the device comprises: The system comprises an acquisition module, a first parameter class and a second parameter class, wherein the acquisition module is used for acquiring the description information of each attribute in the first parameter class when the operation report is wrong; The determining module is used for determining the description information of the changed attribute corresponding to the first parameter class under the condition that the data structure of the first parameter class is determined to be changed according to the description information of each attribute; And the adjustment module is used for acquiring an attribute analysis template of the first parameter class and adjusting the attribute analysis template according to the description information of the changed attribute. The embodiment of the application provides electronic equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the data processing method provided by one or more of the technical schemes when executing the program. The embodiment of the application provides a computer storage medium which stores a computer program, and the computer program can realize the data processing method provided by one or more of the technical schemes after being executed by a processor. The present application provides a computer program product comprising a computer program which, when executed by a processor, implements the data processing method provided by one or more of the foregoing aspects. The embodiment of the application provides a data processing method, a device, electronic equipment, a computer storage medium and a computer program product, wherein the method is applied to a service calling end of a micro-service architecture, and comprises the steps of obtaining description information of each attribute in a first parameter class when running error occurs, enabling the first parameter class to represent a self-defined interface parameter class, determining description information of a change attribute corresponding to the first parameter class according to the description information of each attribute under the condition that a data structure of the first parameter class is determined to change, obtaining an attribute analysis template of the first parameter class, and adjusting the att