Protobuf format data restoration method and system, and terminal

WO2026188735A1PCT designated stage Publication Date: 2026-09-17SHANGHAI YVIEW TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/117535
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-03-10
Filing Date
2025-08-28
Publication Date
2026-09-17

Smart Images

  • Figure CN2025117535_17092026_PF_FP_ABST
    Figure CN2025117535_17092026_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of data processing, and in particular to a Protobuf format data restoration method and system, and a terminal. The method comprises: acquiring Protobuf format data information and restoration requirement information; retrieving data byte information and data source information on the basis of the Protobuf format data information; according to a correlation between the data source information and predefined source reference byte information, determining source reference byte information corresponding to the data source information; determining data semantic information according to the source reference byte information and the data byte information; and determining restored data information according to the restoration requirement information and the data semantic information, and outputting the restored data information. The present invention has the effect of facilitating restoration of Protobuf data lacking a Protobuf definition file.
Need to check novelty before this filing date? Find Prior Art

Description

A method, system, and terminal for restoring Protobuf format data. Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, system, and terminal for restoring Protobuf format data. Background Technology

[0002] Data processing refers to a series of operations performed on raw data to extract useful information, support decision-making, or meet specific needs. It encompasses the entire lifecycle of data, from collection, storage, cleaning, transformation, analysis to visualization.

[0003] Protobuf is commonly used in network communication as a data exchange format for configuration files and for transmitting structured data between different systems. To convert binary Protobuf data back into human-readable or program-processable structured data, it is necessary to restore the Protobuf data. Currently, restoring Protobuf data from network traffic typically involves obtaining the Protobuf definition file (i.e., the .proto file), compiling the Protobuf definition file to generate code, reading the serialized Protobuf binary data, and then using the generated code to deserialize the binary data into an object to complete the restoration.

[0004] When the Protobuf data lacks a Protobuf definition file, it is inconvenient to restore the Protobuf data. Summary of the Invention

[0005] To facilitate the restoration of Protobuf data lacking a Protobuf definition file, this invention provides a method, system, and terminal for restoring Protobuf format data.

[0006] In a first aspect, the present invention provides a method for restoring Protobuf format data, employing the following technical solution:

[0007] A method for restoring Protobuf format data includes:

[0008] Obtain Protobuf format data information and restoration requirements;

[0009] Retrieves data byte information and data source information based on Protobuf format data information;

[0010] Based on the correspondence between the data source information and the preset source base byte information, the source base byte information corresponding to the data source information is determined;

[0011] The meaning of the data is determined based on the source baseline byte information and the data byte information;

[0012] The restoration data information is determined based on the restoration requirement information and the data meaning information, and then the restoration data information is output.

[0013] Optionally, methods for determining the meaning of data include:

[0014] Determine whether the source baseline byte information and the data byte information are consistent;

[0015] If so, the data byte information that is consistent with the source reference byte information will be taken as the consistent byte information, and the data byte information other than the consistent byte information will be taken as the remaining byte information;

[0016] Based on the correspondence between consistent byte information and preset consistent byte meaning information, the consistent byte meaning information corresponding to the consistent byte information is determined;

[0017] Based on the correspondence between the remaining byte information and the preset remaining byte meaning information, the remaining byte meaning information corresponding to the remaining byte information is determined;

[0018] The consistent byte meaning information is combined with the remaining byte meaning information to form a comprehensive byte meaning information, and the comprehensive byte meaning information is used as the data meaning information;

[0019] If not, then similar byte information is selected based on the source baseline byte information and the data byte information;

[0020] The similarity meaning information is determined based on the similarity byte information and the data byte information, and the similarity meaning information is used as the data meaning information.

[0021] Optional methods for selecting similar byte information include:

[0022] Retrieve single byte information and numerical values ​​of the reference byte based on the source reference byte information;

[0023] Select the data byte information that matches the baseline single byte information and use it as the byte consistency information;

[0024] Retrieve single-byte position points and individual byte information based on byte consistency information;

[0025] Individual byte information is combined based on adjacent single-byte location points to form adjacent combined byte information;

[0026] Retrieve the numerical value of the combined bytes based on adjacent combined byte information;

[0027] Based on the correspondence between the base byte count and the preset byte selection count, determine the byte selection count corresponding to the base byte count.

[0028] Based on the comparison results of the combined byte values ​​and the selected byte values, adjacent combined byte information is selected as adjacent selected byte information, and the adjacent selected byte information is regarded as similar byte information.

[0029] Optionally, methods for determining adjacent selected byte information include:

[0030] Determine if the combined byte values ​​are greater than the selected byte values;

[0031] If so, the adjacent combined byte information corresponding to the combined byte values ​​greater than the selected byte values ​​will be used as the adjacent selected byte information;

[0032] If not, calculate the difference between the combined byte values ​​and the selected byte values ​​and use it as the number deviation value;

[0033] Based on the correspondence between the number deviation value and the preset position deviation reference distance value, the position deviation reference distance value corresponding to the number deviation value is determined;

[0034] Retrieve the edge position points of combined bytes based on adjacent combined byte information;

[0035] Calculate the distance between adjacent combined byte edge locations and use it as the edge location distance value;

[0036] Based on the comparison between the position deviation reference distance value and the edge position distance value, adjacent combined byte information is selected as edge selection byte information, and the edge selection byte information is used as adjacent selection byte information.

[0037] Optionally, the methods for selecting edge selection byte information include:

[0038] Determine whether the distance value at the edge position is less than the reference distance value for the position deviation;

[0039] If so, the adjacent combined byte information corresponding to the edge position distance value that is less than the position deviation reference distance value will be used as the edge combined byte information;

[0040] Analyze the overlap between edge-combined byte information and source baseline byte information and use it as the edge-combined overlap rate;

[0041] Based on the comparison results between the edge combination overlap rate and the preset edge combination benchmark overlap rate, edge combination byte information is selected and used as edge selection byte information;

[0042] If not, analyze the deviation between adjacent combined byte information and source reference byte information and use it as the adjacent combined deviation value;

[0043] Based on the comparison results between the adjacent combination deviation value and the preset deviation benchmark value, adjacent combination byte information is selected and used as edge selection byte information.

[0044] Optional methods for determining similar meaning information include:

[0045] Based on the correspondence between similar byte information and preset similar byte meaning information, the meaning information of similar bytes corresponding to the similar byte information is determined;

[0046] Data bytes other than similar bytes are treated as difference bytes.

[0047] Based on the correspondence between the difference byte information and the preset difference byte meaning information, the difference byte meaning information corresponding to the difference byte information is determined;

[0048] Based on the correspondence between similar byte meaning information and preset related meaning vocabulary information, the related meaning vocabulary information corresponding to the similar byte meaning information is determined;

[0049] Determine whether the difference byte meaning information contains relevant semantic vocabulary information;

[0050] If so, the meaning information of similar bytes and the meaning information of different bytes will be combined and used as the meaning information of similar bytes;

[0051] If not, then based on the correspondence between the data byte information and the preset comprehensive meaning information of the data byte, the comprehensive meaning information of the data byte corresponding to the data byte information is determined, and the comprehensive meaning information of the data byte is used as the similar meaning information.

[0052] Optionally, methods for determining the restored data information include:

[0053] Retrieve requirement type information based on restored requirement information;

[0054] Based on the correspondence between demand type information and preset demand type vocabulary information, determine the demand type vocabulary information corresponding to the demand type information;

[0055] Determine whether the data meaning information contains similar byte meaning information;

[0056] If so, then based on the consistency between the relevant semantic vocabulary information and the demand category vocabulary information, the similar data information to be restored will be determined, and the similar data information to be restored will be used as the restored data information.

[0057] If not, then the information on the types of requirements will be combined to form a comprehensive meaning of the requirements.

[0058] Based on the correspondence between the comprehensive meaning information of demand and the preset source information of demand meaning, the source information of demand meaning corresponding to the comprehensive meaning information of demand is determined;

[0059] The information on the source of the demand meaning is used as the data source information, and the data meaning information is re-analyzed and obtained.

[0060] Optionally, methods for determining similar data information include:

[0061] Based on the correspondence between the demand type information and the preset type data demand type information, determine the type data demand type information corresponding to the demand type information;

[0062] Determine whether the relevant semantic vocabulary information matches the vocabulary information related to the type of requirement;

[0063] If so, then the similar byte meaning information is adjusted based on the type data requirement information to obtain the similar byte requirement data information;

[0064] Based on the type information of the data requirement, the type of the difference byte meaning information is adjusted to obtain the difference byte requirement data information, and the similar byte requirement data information is combined with the difference byte requirement data information to restore the similar data information;

[0065] If not, then based on the vocabulary information of the demand type, the meaning information of similar bytes and the meaning information of different bytes are selected and used as the meaning information of demand type selection, and the similar meaning information other than the meaning information of demand type selection is used as the remaining meaning information of demand type.

[0066] Based on the category data demand type information, the type of demand type selection meaning information is adjusted to obtain the selection meaning demand data information;

[0067] Based on the type information of the demand data, the remaining meaning information of the demand type is adjusted to obtain the remaining meaning demand data information. The selected meaning demand data information is then combined with the remaining meaning demand data information to restore similar data information.

[0068] Secondly, this invention provides a system for restoring Protobuf format data, employing the following technical solution:

[0069] A system for restoring Protobuf format data, comprising:

[0070] The acquisition module is used to acquire Protobuf format data information and restoration requirement information;

[0071] A memory for storing a program for restoring Protobuf format data as described in any one of the first aspects;

[0072] The processor loads and executes programs from memory.

[0073] Thirdly, the present invention provides a smart terminal, which adopts the following technical solution:

[0074] A smart terminal includes a memory and a processor, wherein the memory stores a computer program capable of being loaded by the processor and executing a method for restoring Protobuf format data as described in any one of the first aspects.

[0075] In summary, the present invention has at least one of the following beneficial technical effects:

[0076] 1. By acquiring and retrieving data byte information and data source information from Protobuf format data and restoration requirements, the source base byte information is determined by querying the data source information, the data meaning information is determined by the source base byte information and data byte information, and the restoration data information is determined and output by the restoration requirements information and data meaning information, thus facilitating the restoration of Protobuf data lacking a Protobuf definition file;

[0077] 2. By determining whether the source baseline byte information and the data byte information are consistent, and when they are consistent, defining the consistent byte information and the remaining byte information, querying and determining the meaning information of the consistent bytes and the meaning information of the remaining bytes respectively, and then combining them to form a comprehensive byte meaning information as the data meaning information, the accuracy of the obtained data meaning information is improved;

[0078] 3. Retrieve the reference single byte information and reference byte values ​​through the source reference byte information, and define byte consistency information to retrieve the single byte position point and single byte information. Combine these to obtain adjacent combined byte information and retrieve the combined byte values. Determine the byte selection value by querying the reference byte values. Analyze the comparison results between the combined byte values ​​and the byte selection values ​​to select adjacent combined byte information as adjacent selected byte information. Treat the adjacent selected byte information as similar byte information to improve the accuracy of the obtained similar byte information. Attached Figure Description

[0079] Figure 1 is a flowchart of a method for restoring Protobuf format data according to an embodiment of this application;

[0080] Figure 2 is a flowchart of a method for determining the meaning information of data according to an embodiment of this application;

[0081] Figure 3 is a flowchart of the method for selecting similar byte information according to an embodiment of this application;

[0082] Figure 4 is a flowchart of the method for determining adjacent selected byte information according to an embodiment of this application;

[0083] Figure 5 is a flowchart of the edge selection byte information selection method according to an embodiment of this application;

[0084] Figure 6 is a flowchart of a method for determining similar meaning information according to an embodiment of this application;

[0085] Figure 7 is a flowchart of the method for determining restored data information according to an embodiment of this application. Detailed Implementation

[0086] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.

[0087] A method for restoring Protobuf format data involves acquiring Protobuf format data information and restoration requirement information, determining and combining the meaning of bytes in the Protobuf format data based on the data source or restoration requirements, thereby obtaining the final restored data information, which facilitates the restoration of Protobuf data lacking a Protobuf definition file.

[0088] Referring to Figure 1, an embodiment of the present invention discloses a method for restoring Protobuf format data, which includes:

[0089] Step S100: Obtain Protobuf format data information and restoration requirement information.

[0090] The Protobuf format data information refers to the specific bytes and source information of the data in Protobuf format, while the restoration requirement information refers to the requirements for restoring the Protobuf format data. Both the Protobuf format data information and the restoration requirement information are obtained through pre-input.

[0091] Step S101: Retrieve data byte information and data source information based on Protobuf format data information.

[0092] The Protobuf format data information includes data byte information and data source information. Data byte information refers to the byte information corresponding to the Protobuf format data, while data source information refers to the source information of the Protobuf format data. Retrieving the data byte information and data source information from the Protobuf format data information facilitates subsequent use.

[0093] Step S102: Determine the source reference byte information corresponding to the data source information based on the correspondence between the data source information and the preset source reference byte information.

[0094] The source reference byte information refers to the reference byte information used to indicate the meaning of the data in the data source. Different data source information corresponds to different source reference byte information. The source reference byte information is obtained by querying a database that stores different data source information and their corresponding source reference byte information. This database is obtained by querying the data source information. Determining the source reference byte information through data source information query facilitates subsequent use.

[0095] Step S103: Determine the meaning information of the data based on the source base byte information and the data byte information.

[0096] The data meaning information refers to the meaning information corresponding to each byte in the Protobuf format data. This meaning information is determined by analyzing the source base byte information and the data byte information, facilitating subsequent use. The specific steps for determining the data meaning information are described in steps S200 to S206.

[0097] Step S104: Determine the restoration data information based on the restoration requirement information and the data meaning information, and output the restoration data information.

[0098] The restored data information refers to the data information after restoring Protobuf format data according to the restoration requirements. This is achieved by analyzing the restoration requirements and the meaning of the data to determine and output the restored data information, thus facilitating the restoration of Protobuf data lacking a Protobuf definition file. The specific steps for determining the restored data information are detailed in steps S700 to S706.

[0099] In step S103 shown in Figure 1, in order to further ensure the rationality of the data meaning information, it is necessary to perform further separate analysis and calculation on the data meaning information, which will be explained in detail through the steps shown in Figure 2.

[0100] Referring to Figure 2, the method for determining the meaning of data includes the following steps:

[0101] Step S200: Determine whether the source reference byte information and the data byte information are consistent. If yes, proceed to step S201; if no, proceed to step S205.

[0102] Specifically, by judging whether the source reference byte information and the data byte information are consistent, it is determined whether the meaning bytes in the data bytes are consistent with the source corresponding to the source.

[0103] Step S201: Take the data byte information that is consistent with the source reference byte information as the consistent byte information, and take the data byte information other than the consistent byte information as the remaining byte information.

[0104] Among them, consistent byte information refers to the byte information corresponding to the source reference byte information, and remaining byte information refers to the byte information other than those that are consistent. When the source reference byte information and the data byte information are consistent, it means that the bytes in the data at this time are consistent with the bytes corresponding to the source. Therefore, consistent byte information and remaining byte information are defined for the convenience of subsequent use.

[0105] Step S202: Determine the consistent byte meaning information corresponding to the consistent byte information based on the correspondence between the consistent byte information and the preset consistent byte meaning information.

[0106] Among them, the consistent byte meaning information refers to the meaning information corresponding to bytes that are consistent with the source reference bytes. Different consistent byte information corresponds to different consistent byte meaning information. The consistent byte meaning information is obtained by querying a database that stores different consistent byte information and their corresponding consistent byte meaning information. This database is obtained after pre-input. Determining the consistent byte meaning information through consistent byte information query facilitates subsequent use.

[0107] Step S203: Determine the remaining byte meaning information corresponding to the remaining byte information based on the correspondence between the remaining byte information and the preset remaining byte meaning information.

[0108] The remaining byte meaning information refers to the meaning information corresponding to bytes that are inconsistent with the source baseline bytes. Different remaining byte information corresponds to different remaining byte meaning information retrieved from a database, which is obtained after pre-input. Determining the remaining byte meaning information through remaining byte information query facilitates subsequent use.

[0109] Step S204: Combine the consistent byte meaning information with the remaining byte meaning information to form a comprehensive byte meaning information, and use the comprehensive byte meaning information as the data meaning information.

[0110] Among them, the comprehensive byte meaning information refers to the comprehensive meaning information corresponding to all bytes. By combining the consistent byte meaning information with the remaining byte meaning information to form the comprehensive byte meaning information, and using the comprehensive byte meaning information as the data meaning information, the accuracy of the obtained data meaning information is improved.

[0111] Step S205: Select similar byte information based on the source baseline byte information and the data byte information.

[0112] Among them, similar byte information refers to the byte information corresponding to the existence of similar bytes. When the source reference byte information and the data byte information do not match, it means that the bytes in the data do not match the bytes corresponding to the source. Therefore, by analyzing the source reference byte information and the data byte information, similar byte information is selected for subsequent use. The specific steps for selecting similar byte information are shown in steps S300 to S306.

[0113] Step S206: Determine the similar meaning information based on the similar byte information and the data byte information, and use the similar meaning information as the data meaning information.

[0114] The similar meaning information refers to the meaning information corresponding to similar bytes. By analyzing the similar byte information and the data byte information, the similar meaning information is determined and used as the data meaning information, thereby improving the accuracy of the obtained data meaning information. The specific steps for determining the similar meaning information are described in steps S600 to S606.

[0115] In step S205 shown in Figure 2, in order to further ensure the rationality of similar byte information, it is necessary to perform further separate analysis and calculation on the similar byte information, which will be explained in detail through the steps shown in Figure 3.

[0116] Referring to Figure 3, the method for selecting similar byte information includes the following steps:

[0117] Step S300: Retrieve the single byte information of the reference and the value of the reference bytes based on the source reference byte information.

[0118] The source reference byte information includes reference single byte information and reference byte count values. Reference single byte information refers to the information of a single reference byte in the data source, and reference byte count values ​​refer to the total number of reference bytes in the data source. The reference single byte information and reference byte count values ​​are retrieved using the source reference byte information for convenient subsequent use.

[0119] Step S301: Select the data byte information that is consistent with the baseline single byte information and use it as the byte consistency information.

[0120] Among them, byte consistency information refers to byte information that is consistent with the reference single byte. By selecting the byte information in the data byte information that is consistent with the reference single byte information and using it as byte consistency information, it is convenient for subsequent use.

[0121] Step S302: Retrieve the single-byte position point and single-byte information based on the byte consistency information.

[0122] The byte consistency information includes single-byte position points and single-byte information. A single-byte position point refers to the position point corresponding to a single byte, and single-byte information refers to the byte information corresponding to a single byte. The single-byte position points and single-byte information are retrieved through the byte consistency information for convenient subsequent use.

[0123] Step S303: Combine individual byte information based on adjacent single-byte position points to form adjacent combined byte information.

[0124] Among them, adjacent combined byte information refers to byte information after combining adjacent single bytes. By combining the single byte information corresponding to adjacent single byte position points to form adjacent combined byte information, it is convenient for subsequent use.

[0125] Step S304: Retrieve the numerical value of the combined bytes based on the adjacent combined byte information.

[0126] The combined byte count refers to the number of bytes corresponding to the combined bytes. The individual bytes are counted by using the information of adjacent combined bytes, and the count result is retrieved as the combined byte count for convenient use later.

[0127] Step S305: Determine the number of byte selections corresponding to the number of reference bytes based on the correspondence between the reference byte count and the preset number of byte selections.

[0128] The byte selection value refers to the base number of bytes needed to select a combination of bytes similar to the base byte. Different base byte values ​​correspond to different byte selection values, which are obtained by querying a database that stores the base byte values ​​and their corresponding byte selection values. Determining the byte selection value through the base byte value query facilitates subsequent use.

[0129] Step S306: Based on the comparison result of the combined byte values ​​and the selected byte values, select adjacent combined byte information as adjacent selected byte information, and treat the adjacent selected byte information as similar byte information.

[0130] The adjacent byte selection information refers to the combined byte information selected based on the adjacency of bytes. By analyzing the comparison results between the combined byte values ​​and the selected byte values, adjacent combined byte information is selected as adjacent byte information, and this adjacent byte information is used as similar byte information to improve the accuracy of the obtained similar byte information. The specific selection steps for adjacent byte information are described in steps S400 to S406.

[0131] In step S306 shown in Figure 3, in order to further ensure the rationality of the adjacent selected byte information, it is necessary to perform further separate analysis and calculation on the adjacent selected byte information. The specific steps are explained in detail in Figure 4.

[0132] Referring to Figure 4, the method for determining adjacent selected byte information includes the following steps:

[0133] Step S400: Determine whether the combined byte value is greater than the selected byte value. If yes, proceed to step S401; if no, proceed to step S402.

[0134] Specifically, the method determines whether the combined bytes can be directly selected by checking if the combined byte value is greater than the selected byte value.

[0135] Step S401: Take the adjacent combined byte information corresponding to the combined byte values ​​that are greater than the selected byte values ​​as the adjacent selected byte information.

[0136] When the combined byte count is greater than the byte selection count, it means that the combined byte can be selected directly. Therefore, the adjacent combined byte information corresponding to the combined byte count that is greater than the byte selection count is used as the adjacent selected byte information.

[0137] Step S402: Calculate the difference between the combined byte value and the selected byte value and use it as the number deviation value.

[0138] Among them, the number deviation value refers to the deviation value when there is a deviation in the number. When the number of combined bytes is not greater than the number of bytes selected, it means that the combined bytes cannot be selected directly. Therefore, the difference between the number of combined bytes and the number of bytes selected is calculated and used as the number deviation value for convenient use later.

[0139] Step S403: Determine the position deviation reference distance value corresponding to the number deviation value based on the correspondence between the number deviation value and the preset position deviation reference distance value.

[0140] The position deviation reference distance value refers to the maximum distance that the number of deviations allows for. Different numbers of deviations correspond to different position deviation reference distance values. These reference distance values ​​are obtained by querying a database containing different numbers of deviations and their corresponding position deviation reference distance values. This database is retrieved after pre-input. Determining the position deviation reference distance value through the number of deviations facilitates subsequent use.

[0141] Step S404: Retrieve the edge position points of the combined bytes based on the information of adjacent combined bytes.

[0142] Among them, the edge position point of the combined byte refers to the position point of the edge byte of the combined byte. The edge byte of the combined byte is retrieved by the information of the adjacent combined bytes, and the position point of the edge byte is used as the edge position point of the combined byte for convenient use later.

[0143] Step S405: Calculate the distance between adjacent combined byte edge locations and use it as the edge location distance value.

[0144] Among them, the edge position distance value refers to the distance between the edge positions of two combined bytes when their positions are adjacent. The distance between the edge position points of adjacent combined bytes is calculated and used as the edge position distance value for convenient subsequent use.

[0145] Step S406: Based on the comparison result between the position deviation reference distance value and the edge position distance value, select adjacent combined byte information and use it as edge selection byte information, and use the edge selection byte information as adjacent selection byte information.

[0146] Among them, edge-selected byte information refers to byte information selected based on the distance to the edge. By analyzing the comparison results between the position deviation reference distance value and the edge position distance value, adjacent combined byte information is selected as edge-selected byte information, and the edge-selected byte information is used as adjacent selected byte information to improve the accuracy of the obtained adjacent selected byte information. The specific selection method of adjacent selected byte information is described in steps S500 to S505.

[0147] In step S406 shown in Figure 4, in order to further ensure the rationality of the edge selection byte information, it is necessary to perform further separate analysis and calculation on the edge selection byte information, which will be explained in detail in the steps shown in Figure 5.

[0148] Referring to Figure 5, the method for selecting edge selection byte information includes the following steps:

[0149] Step S500: Determine whether the edge position distance value is less than the position deviation reference distance value. If yes, proceed to step S501; if no, proceed to step S504.

[0150] Specifically, by judging whether the distance value at the edge position is less than the position deviation reference distance value, it is possible to determine whether the distance between the edge positions of two combined bytes is too far when their positions are adjacent.

[0151] Step S501: Take the adjacent combined byte information corresponding to the edge position distance value that is less than the position deviation reference distance value as the edge combined byte information.

[0152] Among them, edge combination byte information refers to the combined byte information of two combination bytes when the edge spacing meets the requirement. When the edge position distance value is less than the position deviation reference distance value, it means that the edge position spacing is not too far when the positions of the two combination bytes are adjacent. Therefore, the adjacent combination byte information corresponding to the edge position distance value that is less than the position deviation reference distance value is used as the edge combination byte information, so as to facilitate subsequent use.

[0153] Step S502: Analyze the overlap between the edge combination byte information and the source reference byte information and use it as the edge combination overlap rate.

[0154] Among them, the edge combination overlap rate refers to the overlap rate between the combined bytes after being combined based on the edge distance and the base byte. The edge combination overlap rate is calculated by measuring the overlap between the edge combined byte information and the source base byte information, which is then used for subsequent applications.

[0155] Step S503: Based on the comparison result between the edge combination overlap rate and the preset edge combination benchmark overlap rate, select the edge combination byte information and use it as the edge selection byte information.

[0156] The edge combination benchmark overlap rate refers to the minimum overlap rate required for selection. By comparing the edge combination overlap rate with the preset edge combination benchmark overlap rate, and selecting the edge combination byte information corresponding to the edge combination overlap rate that is greater than the edge combination benchmark overlap rate as the edge selection byte information, the accuracy of the obtained edge selection byte information is improved.

[0157] Step S504: Analyze the deviation between adjacent combined byte information and source reference byte information and use it as the adjacent combined deviation value.

[0158] The adjacent combination deviation value refers to the degree of deviation between the combined byte and the reference byte. When the edge position distance value is not less than the position deviation reference distance value, it indicates that the edge position spacing is too far when the two combined bytes are adjacent. Therefore, the deviation between the adjacent combined byte information and the source reference byte information is analyzed and calculated and used as the adjacent combination deviation value for subsequent use.

[0159] Step S505: Based on the comparison result between the adjacent combination deviation value and the preset deviation benchmark value, select the adjacent combination byte information and use it as the edge selection byte information.

[0160] The deviation benchmark value refers to the minimum deviation level required for selection. By analyzing the comparison results between adjacent combination deviation values ​​and the preset deviation benchmark value, adjacent combination byte information corresponding to adjacent combination deviation values ​​greater than the deviation benchmark value is selected as edge selection byte information, thereby improving the accuracy of the obtained edge selection byte information.

[0161] In step S206 shown in Figure 2, in order to further ensure the rationality of similar meaning information, it is necessary to perform further separate analysis and calculation on the similar meaning information, which will be explained in detail through the steps shown in Figure 6.

[0162] Referring to Figure 6, the method for determining similar meaning information includes the following steps:

[0163] Step S600: Determine the similar byte meaning information corresponding to the similar byte information based on the correspondence between the similar byte information and the preset similar byte meaning information.

[0164] The meaning information of similar bytes refers to the meaning information corresponding to similar bytes. Different similar byte information corresponds to different similar byte meaning information. The meaning information of similar bytes is obtained by querying a database that stores different similar byte information and their corresponding meaning information. This database is obtained after pre-input. Determining the meaning information of similar bytes through similar byte information query facilitates subsequent use.

[0165] Step S601: Treat the data bytes other than the similar byte information as the difference byte information.

[0166] Among them, the difference byte information refers to the byte information that is inconsistent with the similar byte information. By using the data byte information other than the similar byte information as the difference byte information, it is convenient to use it later.

[0167] Step S602: Determine the difference byte meaning information corresponding to the difference byte information based on the correspondence between the difference byte information and the preset difference byte meaning information.

[0168] The difference byte meaning information refers to the meaning information corresponding to the difference bytes. Different difference byte information corresponds to different difference byte meaning information. The difference byte meaning information is obtained by querying a database that stores different difference byte information and their corresponding difference byte meaning information. This database is obtained after pre-input. Determining the difference byte meaning information through the difference byte information query facilitates subsequent use.

[0169] Step S603: Determine the relevant meaning vocabulary information corresponding to the similar byte meaning information based on the correspondence between the similar byte meaning information and the preset relevant meaning vocabulary information.

[0170] Among them, the related semantic vocabulary information refers to the vocabulary information corresponding to the meanings of similar bytes. Different similar byte meanings correspond to different related semantic vocabulary information. The related semantic vocabulary information is obtained by querying a database that stores similar byte meanings and their corresponding related semantic vocabulary information. This database is obtained after pre-input. Determining the related semantic vocabulary information through similar byte meaning information query facilitates subsequent use.

[0171] Step S604: Determine whether the difference byte meaning information contains related meaning vocabulary information. If yes, proceed to step S605; if no, proceed to step S606.

[0172] Specifically, by judging whether the meaning information of the difference byte contains relevant meaning vocabulary information, it can be determined whether the meaning of the similar byte and the meaning of the difference byte can be regarded as similar meaning information.

[0173] Step S605: Combine the meaning information of similar bytes with the meaning information of different bytes and use them as the meaning information of similar bytes.

[0174] When the meaning information of the difference byte contains relevant meaning vocabulary information, it means that the meaning of the similar byte and the meaning of the difference byte can be used as similar meaning information. Therefore, the meaning information of the similar byte and the meaning information of the difference byte are combined and used as similar meaning information to improve the accuracy of the obtained similar meaning information.

[0175] Step S606: Based on the correspondence between the data byte information and the preset comprehensive meaning information of data bytes, determine the comprehensive meaning information of data bytes corresponding to the data byte information, and use the comprehensive meaning information of data bytes as similar meaning information.

[0176] Among them, the comprehensive meaning information of data bytes refers to the meaning information after combining the meanings of each byte in the data byte. Different data byte information corresponds to different comprehensive meaning information of data bytes. The comprehensive meaning information of data bytes is obtained by querying a database that stores different data byte information and their corresponding comprehensive meaning information of data bytes. This database is obtained after pre-input.

[0177] When the meaning information of the difference byte does not contain relevant meaning vocabulary information, it means that the meaning of the similar byte and the meaning of the difference byte cannot be used as similar meaning information. Therefore, the comprehensive meaning information of the data byte is determined by querying the data byte information, and the comprehensive meaning information of the data byte is used as similar meaning information to improve the accuracy of the obtained similar meaning information.

[0178] In step S104 shown in Figure 1, in order to further ensure the rationality of the restored data information, it is necessary to perform further separate analysis and calculation on the restored data information, which will be explained in detail through the steps shown in Figure 7.

[0179] Referring to Figure 7, the method for determining the restored data information includes the following steps:

[0180] Step S700: Retrieve requirement type information based on the restored requirement information.

[0181] Among them, the restoration requirement information includes requirement type information, which refers to the type of information that needs to be restored when restoring the data. The requirement type information can be retrieved by restoring the requirement information for convenient subsequent use.

[0182] Step S701: Determine the corresponding requirement category vocabulary information based on the correspondence between requirement category information and preset requirement category vocabulary information.

[0183] Among them, the demand category vocabulary information refers to the vocabulary information used to indicate the demand category. Different demand categories correspond to different demand category vocabulary information. The demand category vocabulary information is obtained by querying a database that stores different demand categories and their corresponding demand category vocabulary information. This database is obtained after pre-input. Determining the demand category vocabulary information through demand category information query facilitates subsequent use.

[0184] Step S702: Determine whether the data meaning information contains similar byte meaning information. If yes, proceed to step S703; if no, proceed to step S704.

[0185] Specifically, by judging whether the data meaning information contains similar byte meaning information, it can be determined whether the data meaning information needs to be re-analyzed and obtained.

[0186] Step S703: Based on the consistency between the relevant semantic vocabulary information and the required category vocabulary information, determine the similar data information to be restored, and use the similar data information to be restored as the restored data information.

[0187] Among them, restoring similar data information refers to data information restored based on the similarity of bytes. When the data meaning information contains similar byte meaning information, it means that it is not necessary to re-analyze and obtain the data meaning information. Therefore, by analyzing the consistency between the relevant meaning vocabulary information and the demand category vocabulary information, the restored similar data information is determined and used as the restored data information to improve the accuracy of the obtained restored data information. The specific steps for determining the restored similar data information are referred to steps S800 to S806.

[0188] Step S704: Combine the vocabulary information based on the type of demand to form comprehensive meaning information of the demand.

[0189] Among them, the comprehensive meaning information of demand refers to the comprehensive meaning information that the words corresponding to the demand type can express. When the data meaning information does not contain similar byte meaning information, it means that the data meaning information needs to be re-analyzed and obtained. Therefore, by combining the vocabulary information of demand types, the comprehensive meaning information of demand is formed, which is convenient for subsequent use.

[0190] Step S705: Based on the correspondence between the comprehensive meaning information of the demand and the preset source information of the demand meaning, determine the source information of the demand meaning corresponding to the comprehensive meaning information of the demand.

[0191] Among them, the source information of demand meaning refers to the source information corresponding to data with demand meaning. Different comprehensive demand meanings correspond to different source information of demand meaning. The source information of demand meaning is obtained by querying a database that stores different comprehensive demand meanings and their corresponding source information of demand meaning. This database is obtained after pre-input. Determining the source information of demand meaning through querying the comprehensive demand meaning information facilitates subsequent use.

[0192] Step S706: Use the source information of the demand meaning as the data source information and re-analyze and obtain the data meaning information.

[0193] In this process, by using the source information of the demand meaning as the data source information and re-analyzing the data meaning information, the accuracy of the obtained restored data information is improved.

[0194] In step S703 shown in Figure 7, in order to further ensure the rationality of the restored similar data information, it is necessary to perform further separate analysis and calculation on the restored similar data information, which will be explained in detail through the following steps.

[0195] The method for determining similar data information includes the following steps:

[0196] Step S800: Determine the type data requirement information corresponding to the type of requirement information based on the correspondence between the requirement type information and the preset type data requirement type information.

[0197] Among them, the category data requirement type information refers to the data type information corresponding to the requirement type. Different requirement types correspond to different category data requirement type information. The category data requirement type information is obtained by querying a database that stores different requirement types and their corresponding category data requirement type information. This database is obtained after pre-input. Determining the category data requirement type information through the requirement type information query facilitates subsequent use.

[0198] Step S801: Determine whether the relevant semantic vocabulary information matches the requirement category vocabulary information. If yes, proceed to step S802; if no, proceed to step S804.

[0199] In this process, the consistency between the relevant semantic vocabulary information and the vocabulary information of the demand category is judged to determine whether the data can be directly adjusted for the meanings of similar bytes and the meanings of different bytes.

[0200] Step S802: Adjust the type of similar byte meaning information based on the type data requirement information to obtain similar byte requirement data information.

[0201] Among them, the similar byte requirement data information refers to the data information after adjusting the meaning of similar bytes to the data type corresponding to the category data requirement type information. When the relevant meaning vocabulary information is consistent with the requirement category vocabulary information, it means that the data can be directly adjusted between the meaning of similar bytes and the meaning of different bytes. Therefore, the similar byte meaning information is adjusted by adjusting the type of similar byte meaning information through the category data requirement type information to obtain the similar byte requirement data information, which is convenient for subsequent use.

[0202] Step S803: Adjust the type of the difference byte meaning information based on the type data requirement information to obtain the difference byte requirement data information, and combine the similar byte requirement data information with the difference byte requirement data information to restore the similar data information.

[0203] Among them, the difference byte requirement data information refers to the data information after adjusting the meaning of the difference bytes to the data type corresponding to the category data requirement type information. By adjusting the type of the difference byte meaning information through the category data requirement type information, the difference byte requirement data information is obtained. The similar byte requirement data information is then combined with the difference byte requirement data information to restore the similar data information, thereby improving the accuracy of the obtained restored similar data information.

[0204] Step S804: Based on the vocabulary information of the demand type, select the meaning information of similar bytes and the meaning information of different bytes and use them as the meaning information of demand type selection. Also, use the similar meaning information other than the meaning information of demand type selection as the remaining meaning information of demand type.

[0205] The "requirement type selection meaning information" refers to the meaning information of words that match the required category vocabulary. The "remaining meaning information of the required category" refers to the meaning information of words that do not match the required category vocabulary. When the relevant meaning information matches the required category vocabulary information, it means that data adjustment cannot be made directly based on the meaning of similar bytes and the meaning of different bytes. Therefore, the required category selection meaning information is selected, and the remaining meaning information of the required category is defined for convenient subsequent use.

[0206] Step S805: Based on the type data requirement type information, adjust the type of requirement selection meaning information to obtain the selection meaning requirement data information.

[0207] Among them, the selected meaning requirement data information refers to the data information after adjusting the meaning of the requirement type selection to the data type corresponding to the requirement type data type information. By adjusting the type of the requirement type selection meaning information through the requirement type data type information, the selected meaning requirement data information is obtained, which is convenient for subsequent use.

[0208] Step S806: Based on the type data demand type information, adjust the type of demand type remaining meaning information to obtain remaining meaning demand data information, and combine the selected meaning demand data information with the remaining meaning demand data information to restore similar data information.

[0209] Among them, the remaining meaning demand data information refers to the data information after adjusting the remaining meaning to the data type corresponding to the category data demand type information. The remaining meaning demand data information is obtained by adjusting the type of the demand category demand type information through the category data demand type information. The selected meaning demand data information is then combined with the remaining meaning demand data information to serve as the reconstructed similar data information, thereby improving the accuracy of the obtained reconstructed similar data information.

[0210] Based on the same inventive concept, embodiments of the present invention provide a system for restoring Protobuf format data, comprising:

[0211] The acquisition module is used to acquire Protobuf format data information and restoration requirement information;

[0212] Memory, used to store programs for restoring Protobuf format data as described above;

[0213] The processor loads and executes programs from memory.

[0214] Based on the same inventive concept, embodiments of the present invention provide a smart terminal, including a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executed as described above for restoring Protobuf format data.

[0215] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0216] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A method for restoring Protobuf format data, characterized in that, include: Obtain Protobuf format data information and restoration requirements; Retrieves data byte information and data source information based on Protobuf format data information; Based on the correspondence between the data source information and the preset source base byte information, the source base byte information corresponding to the data source information is determined; The meaning of the data is determined based on the source baseline byte information and the data byte information; The restoration data information is determined based on the restoration requirement information and the data meaning information, and then the restoration data information is output.

2. The method for restoring Protobuf format data according to claim 1, characterized in that, Methods for determining the meaning of data include: Determine whether the source baseline byte information and the data byte information are consistent; If so, the data byte information that is consistent with the source reference byte information will be taken as the consistent byte information, and the data byte information other than the consistent byte information will be taken as the remaining byte information; Based on the correspondence between consistent byte information and preset consistent byte meaning information, the consistent byte meaning information corresponding to the consistent byte information is determined; Based on the correspondence between the remaining byte information and the preset remaining byte meaning information, the remaining byte meaning information corresponding to the remaining byte information is determined; The consistent byte meaning information is combined with the remaining byte meaning information to form a comprehensive byte meaning information, and the comprehensive byte meaning information is used as the data meaning information; If not, then similar byte information is selected based on the source baseline byte information and the data byte information; The similarity meaning information is determined based on the similarity byte information and the data byte information, and the similarity meaning information is used as the data meaning information.

3. The method for restoring Protobuf format data according to claim 2, characterized in that, Methods for selecting similar byte information include: Retrieve single byte information and numerical values ​​of the reference byte based on the source reference byte information; Select the data byte information that matches the baseline single byte information and use it as the byte consistency information; Retrieve single-byte position points and individual byte information based on byte consistency information; Individual byte information is combined based on adjacent single-byte location points to form adjacent combined byte information; Retrieve the numerical value of the combined bytes based on adjacent combined byte information; Based on the correspondence between the base byte count and the preset byte selection count, determine the byte selection count corresponding to the base byte count. Based on the comparison results of the combined byte values ​​and the selected byte values, adjacent combined byte information is selected as adjacent selected byte information, and the adjacent selected byte information is regarded as similar byte information.

4. The method for restoring Protobuf format data according to claim 3, characterized in that, Methods for determining adjacent selected byte information include: Determine if the combined byte values ​​are greater than the selected byte values; If so, the adjacent combined byte information corresponding to the combined byte values ​​greater than the selected byte values ​​will be used as the adjacent selected byte information; If not, calculate the difference between the combined byte values ​​and the selected byte values ​​and use it as the number deviation value; Based on the correspondence between the number deviation value and the preset position deviation reference distance value, the position deviation reference distance value corresponding to the number deviation value is determined; Retrieve the edge position points of combined bytes based on adjacent combined byte information; Calculate the distance between adjacent combined byte edge locations and use it as the edge location distance value; Based on the comparison between the position deviation reference distance value and the edge position distance value, adjacent combined byte information is selected as edge selection byte information, and the edge selection byte information is used as adjacent selection byte information.

5. The method for restoring Protobuf format data according to claim 4, characterized in that, The methods for selecting edge selection byte information include: Determine whether the distance value at the edge position is less than the reference distance value for the position deviation; If so, the adjacent combined byte information corresponding to the edge position distance value that is less than the position deviation reference distance value will be used as the edge combined byte information; Analyze the overlap between edge-combined byte information and source baseline byte information and use it as the edge-combined overlap rate; Based on the comparison results between the edge combination overlap rate and the preset edge combination benchmark overlap rate, edge combination byte information is selected and used as edge selection byte information; If not, analyze the deviation between adjacent combined byte information and source reference byte information and use it as the adjacent combined deviation value; Based on the comparison results between the adjacent combination deviation value and the preset deviation benchmark value, adjacent combination byte information is selected and used as edge selection byte information.

6. The method for restoring Protobuf format data according to claim 2, characterized in that, Methods for determining similar meaning information include: Based on the correspondence between similar byte information and preset similar byte meaning information, the meaning information of similar bytes corresponding to the similar byte information is determined; Data bytes other than similar bytes are treated as difference bytes. Based on the correspondence between the difference byte information and the preset difference byte meaning information, the difference byte meaning information corresponding to the difference byte information is determined; Based on the correspondence between similar byte meaning information and preset related meaning vocabulary information, the related meaning vocabulary information corresponding to the similar byte meaning information is determined; Determine whether the difference byte meaning information contains relevant semantic vocabulary information; If so, the meaning information of similar bytes and the meaning information of different bytes will be combined and used as the meaning information of similar bytes; If not, then based on the correspondence between the data byte information and the preset comprehensive meaning information of the data byte, the comprehensive meaning information of the data byte corresponding to the data byte information is determined, and the comprehensive meaning information of the data byte is used as the similar meaning information.

7. The method for restoring Protobuf format data according to claim 6, characterized in that, The methods for determining the restored data information include: Retrieve requirement type information based on restored requirement information; Based on the correspondence between demand type information and preset demand type vocabulary information, determine the demand type vocabulary information corresponding to the demand type information; Determine whether the data meaning information contains similar byte meaning information; If so, then based on the consistency between the relevant semantic vocabulary information and the demand category vocabulary information, the similar data information to be restored will be determined, and the similar data information to be restored will be used as the restored data information. If not, then the information on the types of requirements will be combined to form a comprehensive meaning of the requirements. Based on the correspondence between the comprehensive meaning information of demand and the preset source information of demand meaning, the source information of demand meaning corresponding to the comprehensive meaning information of demand is determined; The information on the source of the demand meaning is used as the data source information, and the data meaning information is re-analyzed and obtained.

8. The method for restoring Protobuf format data according to claim 7, characterized in that, Methods for determining similar data information include: Based on the correspondence between the demand type information and the preset type data demand type information, determine the type data demand type information corresponding to the demand type information; Determine whether the relevant semantic vocabulary information matches the vocabulary information related to the type of requirement; If so, then the similar byte meaning information is adjusted based on the type data requirement information to obtain the similar byte requirement data information; Based on the type information of the data requirement, the type of the difference byte meaning information is adjusted to obtain the difference byte requirement data information, and the similar byte requirement data information is combined with the difference byte requirement data information to restore the similar data information; If not, then based on the vocabulary information of the demand type, the meaning information of similar bytes and the meaning information of different bytes are selected and used as the meaning information of demand type selection, and the similar meaning information other than the meaning information of demand type selection is used as the remaining meaning information of demand type. Based on the category data demand type information, the type of demand type selection meaning information is adjusted to obtain the selection meaning demand data information; Based on the type information of the demand data, the remaining meaning information of the demand type is adjusted to obtain the remaining meaning demand data information. The selected meaning demand data information is then combined with the remaining meaning demand data information to restore similar data information.

9. A system for restoring Protobuf format data, characterized in that, include: The acquisition module is used to acquire Protobuf format data information and restoration requirement information; A memory for storing a program for restoring Protobuf format data as described in any one of claims 1 to 8; The processor loads and executes programs from memory.

10. A smart terminal, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program capable of being loaded by the processor and executing the method for restoring Protobuf format data as described in any one of claims 1 to 8.