Program information processing method, device, terminal and medium

By introducing encapsulation fields into the program code, parsing the characteristic information, and uploading it to the blockchain, the problem of traceability of program code and protection of developers' labor results is solved, and the intelligence and traceability of the code are realized.

CN112346731BActive Publication Date: 2024-09-06CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011153217.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-23
Publication Date
2024-09-06
Estimated Expiration
2040-10-23

AI Technical Summary

Technical Problem

Due to the open source nature of existing program codes, it is difficult to protect the fruits of developers' labor and lack traceability. Users can obtain and run the code by copying and pasting, making developers' contributions untraceable.

Method used

By introducing encapsulated fields into the program code, parsing these fields to obtain feature information, such as version, operating environment, and developer information, and uploading the operating information and feature information to the blockchain, the traceability and intelligence of the code can be achieved.

Benefits of technology

It effectively protects the fruits of developers' labor, improves the traceability of program codes and the intelligence of terminals, ensures that developers' identity information can be tracked and counted when the code is running, and at the same time enhances the confidentiality of information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112346731B
    Figure CN112346731B
Patent Text Reader

Abstract

The embodiment of the present invention discloses a program information processing method, device, terminal and medium, wherein the method comprises: receiving an operation instruction for a program code, obtaining an encapsulated field in the program code, parsing the encapsulated field, obtaining characteristic information corresponding to the encapsulated field, running the program code, and obtaining the operation information of the program code, and uploading the operation information and characteristic information to the blockchain after pre-processing, wherein the encapsulated field is a field in which the characteristic information of the program code is encapsulated and displayed in the form of code, the characteristic information is used to indicate at least one of the version characteristics of the program code, the operating environment characteristics of the program code and the user characteristics of the development program code, and the operation information is used to indicate the account characteristics of the running program code. By implementing the above method, the encapsulated field in the program code can be parsed to obtain the characteristic information of the program code, thereby improving the traceability of the program code and the intelligence of the terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a program information processing method, device, terminal and medium. Background Art

[0002] Most current programs (web pages, applications, operating systems, etc.) are composed of multiple modules, and different modules are developed separately by multiple developers. Each module can correspond to a requirement, such as a display page, a transmission function, a detection function, etc. However, since the program code used to write the program is open source, that is, once the program code is known, the program can be run, so that after the user knows the program code, the program code can be copied and pasted, and the program can be run, so that the labor results of the developers who actually write the program code cannot be effectively protected.

[0003] Therefore, a method for processing program information is needed so that the work results of program code developers can be effectively protected and the traceability of program code can be improved. Summary of the invention

[0004] The embodiments of the present application provide a program information processing method, device, terminal and medium, which can parse the encapsulation fields in the program code to obtain the characteristic information of the program code, thereby improving the traceability of the program code and the intelligence of the terminal.

[0005] In a first aspect, an embodiment of the present invention provides a program information processing method, the method comprising:

[0006] Receiving an execution instruction for a program code;

[0007] Obtaining an encapsulated field in the program code, wherein the encapsulated field is a field that is encapsulated with characteristic information of the program code and displayed in code form, wherein the characteristic information is used to indicate at least one of a version characteristic of the program code, a running environment characteristic of the program code, and a user characteristic of developing the program code;

[0008] Parsing the encapsulation field to obtain characteristic information corresponding to the encapsulation field;

[0009] Running the program code and obtaining running information of the program code, wherein the running information is used to indicate characteristics of an account running the program code;

[0010] The operation information and the characteristic information are pre-processed and uploaded to the blockchain.

[0011] In a second aspect, an embodiment of the present invention provides a program information processing device, the device comprising:

[0012] A receiving module, used for receiving an operating instruction for a program code;

[0013] an acquisition module, configured to acquire an encapsulated field in the program code, wherein the encapsulated field is a field that is encapsulated with characteristic information of the program code and displayed in code form, and the characteristic information is used to indicate at least one of a version characteristic of the program code, a running environment characteristic of the program code, and a user characteristic of developing the program code;

[0014] A parsing module, used to parse the encapsulation field to obtain characteristic information corresponding to the encapsulation field;

[0015] An operation module, used to run the program code and obtain operation information of the program code, wherein the operation information is used to indicate the characteristics of the account running the program code;

[0016] The uploading module is used to upload the operation information and the characteristic information to the blockchain after pre-processing.

[0017] In a third aspect, an embodiment of the present invention provides a terminal, comprising a processor, an input device, an output device and a memory, wherein the processor, input device, output device and memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method described in the first aspect.

[0018] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, characterized in that the computer storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the method described in the first aspect.

[0019] In an embodiment of the present invention, a terminal receives an execution instruction for a program code, obtains an encapsulated field in the program code, and parses the encapsulated field to obtain characteristic information corresponding to the encapsulated field. The terminal executes the program code and obtains the execution information of the program code. The terminal pre-processes the execution information and characteristic information and uploads them to the blockchain, wherein the encapsulated field is a field in which the characteristic information of the program code is encapsulated and displayed in the form of code. The characteristic information is used to indicate at least one of the version characteristics of the program code, the operating environment characteristics of the program code, and the user characteristics of the development program code. The execution information is used to indicate the account characteristics of the running program code. By implementing the above method, the encapsulated field in the program code can be parsed to obtain the characteristic information of the program code, thereby improving the traceability of the program code and the intelligence of the terminal. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0021] Figure 1 It is a flowchart of a program information processing method provided by an embodiment of the present invention;

[0022] Figure 2 is a flowchart of another program information processing method provided by an embodiment of the present invention;

[0023] Figure 3 is a schematic diagram of the structure of a program information processing device provided by an embodiment of the present invention;

[0024] Figure 4 It is a schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0026] The program information processing method provided by the embodiment of the present invention is implemented in a terminal, and the terminal includes electronic devices such as a smart phone, a tablet computer, a digital audio and video player, an electronic reader, a handheld game console, or a vehicle-mounted electronic device.

[0027] Figure 1 FIG. 1 is a flow chart of a method for processing program information in an embodiment of the present invention. Figure 1 As shown, the process of the program information processing method in this embodiment may include:

[0028] S101: A terminal receives an execution instruction for a program code.

[0029] In an embodiment of the present invention, the terminal can obtain program code based on instructions input by a user, and receive execution instructions for the program code, wherein the execution instructions can be generated based on operations input by the user, or sent by a device that establishes a connection with the terminal, and the program code can be obtained based on a copy operation input by the user, or based on program code sent by other devices.

[0030] It should be noted that the program code contains encapsulated fields. In the process of developing the program, the developer of the program code can edit his or her identity, version of the program code, operating environment of the program code and other information as the characteristic information of the program code, and encapsulate the characteristic information of the program code to obtain the encapsulated field, and add the encapsulated field to the program code, so that the terminal running the program code can obtain the corresponding characteristic information by parsing the encapsulated field in the program code. For example, the developer edited "Xiao Wang (name), 1.2 (version), linux (operating environment)", and after encapsulating the above information, the encapsulated field "according to $, eberas^, sdajue*" displayed in the form of program code can be obtained. The developer adds the above encapsulated field to the program code, and the user using the terminal can obtain the program code by copying it. Usually, when there are too many program codes, it is difficult for users to find the encapsulated fields hidden in the program code. The encapsulated field records the information of the developer, so that the labor results of the developer are protected.

[0031] S102: The terminal obtains an encapsulation field in the program code.

[0032] In an embodiment of the present invention, after the terminal receives an execution instruction for a program code, it can obtain an encapsulation field in the program code. The encapsulation field is a field that encapsulates characteristic information of the program code and is displayed in the form of code. The characteristic information is used to indicate at least one of version characteristics of the program code, operating environment characteristics of the program code, and user characteristics of the program code developer. Specifically, the developer can encapsulate the corresponding characteristic information and add it to the program code during the process of developing the program.

[0033] In a specific implementation, the program code may include an encapsulation field parsing script, so that when the program code is running, the terminal will be triggered to automatically obtain the encapsulation field in the program code based on the script, or the terminal may also detect the encapsulation field in the program code based on a preset encapsulation field detection method and obtain the encapsulation field. Among them, the preset encapsulation field detection method may be a method based on special character detection. For example, in order to highlight the difference between the encapsulation field and the ordinary program code, the encapsulation field may contain special characters, such as (*, $, ^), and the terminal may traverse the program code to find the special characters to obtain the encapsulation field in the program code. Alternatively, the preset encapsulation field detection method may also be a character format detection method. For example, if the format of the encapsulation field satisfies the alternation of uppercase and lowercase letters, the terminal may detect the field whose format satisfies the alternation of uppercase and lowercase letters from the program code, and determine it as an encapsulation field. Alternatively, the terminal may also find the acquisition method for the encapsulation field in the program code from the source address of the program code, and obtain the encapsulation field in the program code based on the acquisition method.

[0034] S103: The terminal parses the encapsulation field to obtain characteristic information corresponding to the encapsulation field.

[0035] In the embodiment of the present invention, after the terminal obtains the encapsulation field in the program code, it will parse the encapsulation field to obtain the characteristic information corresponding to the encapsulation field.

[0036] Specifically, the terminal can determine the encapsulation method corresponding to the encapsulation field, and use the above encapsulation method to parse the encapsulation field. Different developers can choose different encapsulation methods to encapsulate the characteristic information of the program code. The terminal needs to obtain the encapsulation method of the encapsulation field by the developer to further parse the encapsulation field based on the encapsulation method corresponding to the unsealing method. Among them, the encapsulation and unsealing standards of the field can be artificially established in advance, and the above standards are stored in the standard database, so that the developer can choose the standard encapsulation method stored in the standard database to encapsulate the characteristic information of the program code, and the terminal can find the corresponding standard unsealing method from the standard database to unseale the encapsulated field. Among them, in order to ensure the transparency and reliability of the encapsulation method and unsealing method, the encapsulation and unsealing standards of the above fields can be stored in the blockchain, so that each terminal can obtain the encapsulation and unsealing standards of the field from the blockchain, and encapsulate and unseale the field based on the above standards.

[0037] In one implementation, the terminal determines an unsealing method for the encapsulation field based on an identifier in the encapsulation field, and uses the unsealing method to parse the encapsulation field. Specifically, the terminal can parse the encapsulation field in a specific way: the terminal obtains an identifier in each target encapsulation subfield in the encapsulation field, and determines an unsealing method for each target encapsulation subfield based on the identifier in each target encapsulation subfield. The terminal uses the unsealing method corresponding to each target encapsulation subfield to unseale each target encapsulation subfield to obtain a phrase corresponding to each target encapsulation subfield. The terminal merges the phrases corresponding to each target encapsulation subfield to obtain feature information corresponding to the encapsulation field.

[0038] In one implementation, the unsealing method of the encapsulated field is uploaded to the blockchain by the developer, and the terminal obtains the unsealing method of the encapsulated field from the blockchain, and uses the above unsealing method to parse the encapsulated field to obtain the characteristic information corresponding to the encapsulated field.

[0039] In one implementation, the program code includes a script for parsing the encapsulated field, and the terminal runs the script to parse the encapsulated field in the program code to obtain the characteristic information corresponding to the encapsulated field. Optionally, the script also includes a verification program. When the script is run, it triggers the terminal to display a verification information input box on the display page, such as a key input box, a face image input box, etc., so that the user operating the terminal enters the corresponding verification information in the verification information input box. When it is detected that the verification information entered by the user has passed the verification, the script is run to parse the encapsulated field.

[0040] In one implementation, the encapsulated field is a link, and the terminal directly finds the characteristic information corresponding to the encapsulated field from the link address based on the link to implement parsing of the encapsulated field.

[0041] In one implementation, the terminal can receive an information call instruction for a program code sent by a client, the information call instruction carries an information call table, the terminal obtains the encapsulation field in the program code according to the information call instruction, and parses the encapsulation field to obtain the characteristic information corresponding to the encapsulation field; the terminal organizes the characteristic information according to the format of the information call table, and adds the organized characteristic information to the information call table to obtain the added information call table, and sends the added information call table to the client. In the above manner, when receiving the information call table sent by the client, the table can be automatically filled in based on the parsing of the encapsulation field, thereby improving the efficiency of information acquisition. Further, the terminal adjusts the storage location of the characteristic information based on the received information table. Specifically, the terminal places the characteristic information that was called the most recently in the first position, so that the above characteristic information can be retrieved first, or the characteristic information is sorted according to the number of times each characteristic information is called, and the characteristic information that ranks first in the order is placed in the first position, so that the characteristic information is retrieved first, thereby improving the efficiency of information retrieval.

[0042] S104: The terminal runs the program code and obtains the running information of the program code.

[0043] In an embodiment of the present invention, the terminal can run the program code and obtain the running information of the program code, wherein the running information is used to indicate the account characteristics of the running program code, that is, the information of the user who runs the program code. The account characteristics may specifically be an account number, account name, account address, etc.

[0044] In one implementation, the characteristic information also includes necessary fields required for the program code to run and the placement location of the necessary fields in the program code. The specific method for the terminal to run the program code may be that the terminal obtains the necessary fields required for the program code to run and the placement location of the necessary fields in the program code from the characteristic information, adds the necessary fields to the placement location in the program code, and runs the program code after adding the necessary fields. In the above method, by placing the necessary fields in the characteristic information, the characteristic information must be parsed when the program code is running, which ensures that the identity information of the program code developer is obtained during the terminal running the program code, and can conveniently count the usage of the program code developed by the developer, which protects the developer's labor results while facilitating the sharing of the program code.

[0045] S105. The terminal pre-processes the operation information and feature information and uploads them to the blockchain.

[0046] In an embodiment of the present invention, after the terminal obtains the running information of the program code, it preprocesses the running information and feature information to obtain a target information storage table. Further, the terminal broadcasts the target information storage table in the blockchain so that each node in the blockchain performs a consensus check on the target information storage table. When the consensus check passes, the terminal packages the target information storage table into blocks and stores the blocks in the blockchain. Among them, the preprocessing is specifically used to organize the running information and feature information of the program code. The specific method of preprocessing can be that the terminal obtains a preset program information storage table, and the preset information storage table is used to store the running information and feature information of the program code; the terminal determines the storage position of each character in the running information and feature information in the information storage table based on the type of different characters in the running information and feature information; and stores each character in the running information and feature information in the information storage table based on the storage position of each character to obtain the target information storage table.

[0047] For example, the running information is "123456 (account number), Xiao Li (account name), No. 16, XX Street (account address)", and the characteristic information is "Xiao Wang (name), 1.2 (version), linux (running environment)", then the terminal can store the above information into the information storage table to obtain the target information storage table, as shown in Table 1.

[0048] Table 1

[0049]

[0050] In one implementation, in order to improve the confidentiality of operation information and feature information, the operation information can be encapsulated to obtain operation encapsulation fields, and the operation encapsulation fields and the encapsulation fields corresponding to the feature information are stored in the information storage table. For example, after encapsulating the operation information, the operation encapsulation fields "sadasaq$(account number), edewes^(account name), sdaqe*(account address)" are obtained, and the encapsulation fields corresponding to the feature information are "accoring$(name), eberas^(version), sdajue*(operating environment)". The terminal can store the above encapsulation fields in the information storage table to obtain the target information storage table, as shown in Table 2.

[0051] Table 2

[0052]

[0053] In an embodiment of the present invention, after the terminal pre-processes the operation information and feature information to obtain the target information storage table, the target information storage table can be stored in the blockchain. Among them, the terminal can upload the operation information and feature information after pre-processing based on the operation input by the user, or the program code includes a trigger script so that the terminal will automatically upload the operation information and feature information after pre-processing when running the program code. By implementing the above method, the program code can be traceable, that is, the developer's information will be implicitly stored in the program code. When other personnel obtain the program code by copying and running it, the operation information and feature information can be stored in the blockchain accordingly, so as to realize the operation monitoring of the program code and protect the labor results of the developer who developed the program code. In addition, by encapsulating the information and filling it into the information storage table, the confidentiality of the information can also be enhanced so that the information will not be maliciously acquired.

[0054] In an embodiment of the present invention, a terminal receives an execution instruction for a program code, obtains an encapsulated field in the program code, and parses the encapsulated field to obtain characteristic information corresponding to the encapsulated field. The terminal executes the program code and obtains the execution information of the program code. The terminal pre-processes the execution information and characteristic information and uploads them to the blockchain, wherein the encapsulated field is a field in which the characteristic information of the program code is encapsulated and displayed in the form of code. The characteristic information is used to indicate at least one of the version characteristics of the program code, the operating environment characteristics of the program code, and the user characteristics of the development program code. The execution information is used to indicate the account characteristics of the running program code. By implementing the above method, the encapsulated field in the program code can be parsed to obtain the characteristic information of the program code, thereby improving the traceability of the program code and the intelligence of the terminal.

[0055] Figure 2 FIG. 1 is a flow chart of another method for processing program information in an embodiment of the present invention. Figure 2As shown, the process of the program information processing method in this embodiment may include:

[0056] S201. The terminal obtains characteristic information of a program code.

[0057] In an embodiment of the present invention, the characteristic information of the program code may specifically include the identity of the person who developed the program code, the version of the program code, the program code, etc., which may be pre-set by the developer when developing the program code. In a specific implementation, the program code developer may input a series of information as the characteristic information of the program code in the terminal, and the terminal acquires the information input by the developer. Alternatively, the developer may also use the client to send the characteristic information of the program code to the terminal, and the terminal receives the characteristic information sent by the client. Optionally, when writing the program code, the developer may also add the necessary fields required for the program code to run and the placement position of the necessary fields in the program code to the characteristic information, that is, if the program code needs to run correctly, the characteristic information must be acquired first, and the necessary fields must be found from the characteristic information and added to the placement position.

[0058] S202: The terminal encapsulates the characteristic information to obtain an encapsulation field corresponding to the characteristic information.

[0059] In the embodiment of the present invention, after the terminal obtains the characteristic information of the program code, it will encapsulate the characteristic information to obtain an encapsulation field corresponding to the characteristic information, and the format of the encapsulation field is a code format.

[0060] In one implementation, the specific method for the terminal to encapsulate the encapsulation field can be that the terminal detects the type of each phrase in the feature information, and uses the encapsulation method corresponding to the type of each phrase to encapsulate each phrase in the feature information to obtain the encapsulation subfield corresponding to each phrase. Among them, the type can be determined by the length of the phrase, such as when the length of the phrase is less than or equal to two characters, the first encapsulation method is used for encapsulation, and when the length of the phrase is greater than two characters, the second encapsulation method is used for encapsulation. Alternatively, the type can include the identity of the person who developed the program code, the version of the program code, and the operating environment of the program code. For the phrase describing the identity of the person who developed the program code, the first encapsulation method is used for encapsulation, for the phrase describing the version of the program code, the second encapsulation method is used for encapsulation, and for the phrase describing the operating environment of the program code, the third encapsulation method is used for encapsulation. The first encapsulation method, the second encapsulation method, and the third encapsulation method can be preset by the R&D personnel. Furthermore, the terminal adds a corresponding identifier to each encapsulation subfield based on the type of each phrase to obtain a target encapsulation subfield corresponding to each phrase. The terminal merges the target encapsulation subfields to obtain an encapsulation field corresponding to the characteristic information, wherein the identifier is used to indicate the encapsulation method corresponding to the encapsulation subfield and the type of phrase corresponding to the encapsulation subfield. For example, the characteristic information of the program code is "Xiao Wang (name), 1.2 (version), linux (operating environment)". After the developer obtains the above characteristic information, it is determined that "Xiao Wang" is the identity of the person who develops the program code, "1.2" is the version of the program code, and "linux" is the operating environment of the program code. The terminal uses the first encapsulation method to encapsulate "Xiao Wang" to obtain the first encapsulation sub-field "accoring", uses the second encapsulation method to encapsulate "1.2" to obtain the second encapsulation sub-field "eberas", and uses the third encapsulation method to encapsulate "linux" to obtain the third encapsulation sub-field "sdajue", among which the identifier corresponding to the type to which "Xiao Wang" belongs is "$", the identifier corresponding to the type to which "1.2" belongs is "^", and the identifier corresponding to the type to which "linux" belongs is "*", then three target encapsulation sub-fields "accoring$, eberas^, sdajue*" can be obtained, and the terminal merges the above three target encapsulations to obtain the encapsulation field corresponding to the characteristic information.

[0061] In one implementation, the terminal may also encapsulate the characteristic information of the program code based on a defined standard encapsulation method. The standard encapsulation method may be a program code encapsulation method defined by multiple users and stored in a standard database. The terminal obtains the standard encapsulation method from the standard database and uses the standard encapsulation method to encapsulate the characteristic information of the program code.

[0062] S203: The terminal determines an adding position for the encapsulation field from the program code, and adds the encapsulation field to the adding position in the program code.

[0063] In the embodiment of the present invention, after obtaining the encapsulation field corresponding to the program code, the terminal determines the adding position for the encapsulation field from the program code, and adds the encapsulation field to the adding position in the program code.

[0064] In one implementation, if there is only one adding position, the terminal may randomly select a position from the program code as the adding position and add it to the program code. Alternatively, the terminal may select a position from the program code as the adding position based on a preset selection rule. The preset selection rule may be a middle selection, i.e., selecting the middle position of the program code as the adding position, or an end selection, i.e., selecting the end of the program code as the adding position.

[0065] In one implementation, there are N adding positions, where N is a positive integer. The terminal can split the encapsulation field to obtain N subfields, randomly select N positions from the program code as adding positions, and add the N subfields to the N positions respectively.

[0066] S204: The terminal receives an execution instruction for the program code.

[0067] In an embodiment of the present invention, the terminal can obtain program code based on instructions input by a user, and receive execution instructions for the program code, wherein the execution instructions can be generated based on operations input by the user, or sent by a device that establishes a connection with the terminal, and the program code can be obtained based on a copy operation input by the user, or based on program code sent by other devices.

[0068] S205: The terminal obtains the encapsulation field in the program code, and parses the encapsulation field to obtain characteristic information corresponding to the encapsulation field.

[0069] In an embodiment of the present invention, an encapsulated field is a field that encapsulates characteristic information of a program code and is displayed in the form of code. The characteristic information is used to indicate version characteristics of the program code, characteristics of the operating environment of the program code, characteristics of the user who develops the program code, necessary fields required for the program code to run, and the placement of the necessary fields in the program code.

[0070] The terminal may parse the encapsulation field in a specific manner such that the terminal determines the encapsulation method corresponding to the encapsulation field based on special characters in the encapsulation field, and parses the encapsulation field using the decapsulation method corresponding to the encapsulation method to obtain characteristic information corresponding to the encapsulation field.

[0071] S206: The terminal runs the program code and obtains running information of the program code.

[0072] In an embodiment of the present invention, the running information is used to indicate the characteristics of the account running the program code. The specific process of the terminal running the program code may be that the terminal obtains the necessary fields required for the program code running and the placement position of the necessary fields in the program code from the characteristic information. Further, the terminal adds the necessary fields to the placement position in the program code, and runs the program code after adding the necessary fields. In the above method, by placing the necessary fields in the characteristic information, the characteristic information must be parsed when the program code is running, which ensures that the identity information of the developer is obtained during the terminal running the program code, and the usage of the program code developed by the developer can be conveniently counted, which protects the developer's labor results while facilitating the sharing of the program code.

[0073] Furthermore, after the terminal runs the program code, it will obtain the running information of the program code, wherein the running information is used to indicate the account characteristics of the running program code, that is, the information of the user who runs the program code. The account characteristics may specifically be an account number, account name, account address, etc.

[0074] S207. The terminal pre-processes the operation information and feature information and uploads them to the blockchain.

[0075] In an embodiment of the present invention, after the terminal obtains the running information of the program code, it preprocesses the running information and feature information to obtain a target information storage table. The specific method of preprocessing may be that the terminal obtains a preset information storage table, and the information storage table is used to store the running information and feature information of the program code; the terminal determines the storage position of each character in the running information and feature information in the information storage table based on the type of different characters in the running information and feature information; and stores each character in the running information and feature information in the information storage table based on the storage position of each character to obtain a target information storage table. Further, the terminal broadcasts the target information storage table in the blockchain, so that each node in the blockchain performs a consensus check on the target information storage table; when the consensus check passes, the terminal packages the target information storage table into blocks, and stores the blocks in the blockchain.

[0076] S208. The terminal displays a program interface corresponding to the program code.

[0077] In the embodiment of the present invention, after the terminal runs the program code, the program interface corresponding to the program code can be displayed. For example, if the program code is the code of a web page, the terminal can display the interface of the web page, and if the program code is the code of an application, the terminal displays the interface of the application. The program code includes at least one program code module, and each program code module includes a corresponding encapsulation field. The module division method can be based on function division, that is, one module is divided for each function, or based on developer division, that is, the program code developed by the same developer is used as a module. For the developer, the developer can encapsulate the characteristic information of the program code and add it to the program code corresponding to the module.

[0078] S209: The terminal receives a query instruction input for a target area in the program interface.

[0079] In an embodiment of the present invention, each target area in the program interface may correspond to a code module, each code module includes an encapsulation field, the encapsulation field is generated after encapsulating the characteristic information of the code module, the target area includes a key area, an image area or a text area, and the query instruction is used to query the target characteristic information corresponding to the target area. Specifically, after the terminal displays the program interface, the user can select any area in the display interface as the target area, or an edit information query box is provided in the display interface, and the user can enter any function in the query box, such as a transmission function, a detection function, a display function, etc. The terminal can find the corresponding target area based on the data entered by the user, and enter a specified operation to generate a query instruction input for the target area in the program interface, and the terminal receives the query instruction.

[0080] S210: The terminal obtains a target program code module corresponding to the target area, and finds a corresponding target encapsulation field from the target program code module.

[0081] In the embodiment of the present invention, the terminal may obtain a target program code module corresponding to the target area, and find a corresponding target encapsulation field from the target program code module.

[0082] S211. The terminal obtains target feature information corresponding to the target area from the target encapsulation field, and displays the target feature information in the program interface.

[0083] In an embodiment of the present invention, the terminal can parse the target encapsulation field, obtain the target feature information corresponding to the target area, and display the target feature information corresponding to the target area. Through the above method, the user inputs the corresponding operation to a certain area in the program interface, and queries the feature information corresponding to the area, so as to realize the convenient query of the feature information. For example, if the user needs to query the information of the developer in the text area, the user can select the text area and input the query operation, and the terminal can find the developer's information from the feature information corresponding to the area and display it, so that the user can conveniently query the information of the developer of each part of the program, thereby improving the efficiency of information query.

[0084] In an embodiment of the present invention, a terminal receives an execution instruction for a program code, obtains an encapsulated field in the program code, and parses the encapsulated field to obtain characteristic information corresponding to the encapsulated field. The terminal executes the program code and obtains the execution information of the program code. The terminal pre-processes the execution information and characteristic information and uploads them to the blockchain. Furthermore, the terminal displays a corresponding program interface, receives query operations for different areas input by a user, and displays information of corresponding developers based on the query operations. By implementing the above method, the encapsulated field in the program code can be parsed to obtain characteristic information of the program code, thereby improving the traceability of the program code and the intelligence of the terminal. In addition, information query based on the program interface also facilitates information statistics.

[0085] The following will be combined with the attached Figure 3 The program information processing device provided by the embodiment of the present invention is introduced in detail. Figure 3 The program information processing device shown is used to execute the present invention Figure 1-Figure 2 For the convenience of explanation, only the part related to the embodiment of the present invention is shown, and the specific technical details are not disclosed. Figure 1-Figure 2 The embodiment shown.

[0086] See also Figure 3 , which is a structural diagram of a program information processing device provided by the present invention. The program information processing device 30 may include: a receiving module 301, an acquisition module 302, a parsing module 303, a running module 304, and an uploading module 305.

[0087] The receiving module 301 is used to receive an execution instruction for a program code;

[0088] The acquisition module 302 is used to acquire an encapsulated field in the program code, wherein the encapsulated field is a field that is encapsulated with characteristic information of the program code and displayed in the form of code, and the characteristic information is used to indicate at least one of a version characteristic of the program code, a running environment characteristic of the program code, and a user characteristic of developing the program code;

[0089] The parsing module 303 is used to parse the encapsulation field to obtain characteristic information corresponding to the encapsulation field;

[0090] An operation module 304 is used to execute the program code and obtain operation information of the program code, wherein the operation information is used to indicate the characteristics of the account that executes the program code;

[0091] The uploading module 305 is used to upload the operation information and the characteristic information to the blockchain after pre-processing.

[0092] In one implementation, the acquisition module 301 is specifically configured to:

[0093] Obtain characteristic information of program code;

[0094] Encapsulating the characteristic information to obtain an encapsulation field corresponding to the characteristic information, wherein the format of the encapsulation field is a code format;

[0095] An adding position for the encapsulation field is determined from the program code, and the encapsulation field is added to the adding position in the program code.

[0096] In one implementation, the acquisition module 301 is specifically configured to:

[0097] Detecting the type to which each phrase in the feature information belongs;

[0098] Encapsulate each phrase in the feature information using an encapsulation method corresponding to the type to which each phrase belongs, to obtain an encapsulation subfield corresponding to each phrase;

[0099] Adding a corresponding identifier to each encapsulation subfield based on the type to which each phrase belongs, to obtain a target encapsulation subfield corresponding to each phrase, wherein the identifier is used to indicate an encapsulation mode corresponding to the encapsulation subfield and a type to which the phrase corresponding to the encapsulation subfield belongs;

[0100] The target encapsulation subfields are merged to obtain an encapsulation field corresponding to the characteristic information.

[0101] In one implementation, the parsing module 303 is specifically configured to:

[0102] Obtaining an identifier in each target encapsulation subfield in the encapsulation field;

[0103] Determine a decapsulation mode for each target encapsulation subfield based on the identifier in each target encapsulation subfield;

[0104] Decapsulating each target encapsulation subfield using the decapsulation method of each target encapsulation subfield to obtain a phrase corresponding to each target encapsulation subfield;

[0105] The phrases corresponding to the target encapsulation sub-fields are merged to obtain characteristic information corresponding to the encapsulation field.

[0106] In one implementation, the characteristic information also includes necessary fields required for the program code to run and the placement positions of the necessary fields in the program code. The running module 304 is specifically used to:

[0107] Acquire necessary fields required for the program code to run from the characteristic information, and the placement positions of the necessary fields in the program code;

[0108] The necessary fields are added to the placement location, and the program code after the necessary fields are added is run.

[0109] In one implementation, the program code includes at least one program code module, each program code module includes a corresponding encapsulation field, and the acquisition module 301 is further used to:

[0110] Displaying a program interface corresponding to the program code;

[0111] Receiving a query instruction input for a target area in the program interface, wherein the target area includes a button area, an image area or a text area, and the query instruction is used to query target feature information corresponding to the target area;

[0112] Acquire a target program code module corresponding to the target area, and find a corresponding target encapsulation field from the target program code module;

[0113] Target feature information corresponding to the target area is obtained from the target encapsulation field.

[0114] In one implementation, the upload module 305 is specifically used to:

[0115] Obtaining a preset information storage table, wherein the information storage table is used to store the operation information and the characteristic information;

[0116] Determine the storage position of each character in the operation information and the characteristic information in the information storage table based on the types of different characters in the operation information and the characteristic information;

[0117] Based on the storage position of each character, the operation information and each character in the feature information are stored in the information storage table to obtain a target information storage table;

[0118] Broadcasting the target information storage table in the blockchain so that each node in the blockchain performs consensus verification on the target information storage table;

[0119] When the consensus check is passed, the target information storage table is packaged into blocks, and the blocks are stored in the blockchain.

[0120] In an embodiment of the present invention, a receiving module 301 receives an execution instruction for a program code, an acquiring module 302 acquires an encapsulated field in the program code, a parsing module 303 parses the encapsulated field to obtain characteristic information corresponding to the encapsulated field, an executing module 304 executes the program code and acquires the execution information of the program code, and an uploading module 305 uploads the execution information and characteristic information to the blockchain after preprocessing, wherein the encapsulated field is a field in which the characteristic information of the program code is encapsulated and displayed in the form of code, the characteristic information is used to indicate at least one of the version characteristics of the program code, the operating environment characteristics of the program code, and the user characteristics of the development program code, and the execution information is used to indicate the account characteristics of the running program code. By implementing the above method, the encapsulated field in the program code can be parsed to obtain the characteristic information of the program code, thereby improving the traceability of the program code and the intelligence of the terminal.

[0121] See also Figure 4 , which is a schematic diagram of the structure of a terminal according to an embodiment of the present invention. Figure 4 As shown, the terminal includes: at least one processor 401, an input device 403, an output device 404, a memory 405, and at least one communication bus 402. The communication bus 402 is used to realize the connection and communication between these components. The input device 403 can be a control panel or a microphone, etc., and the output device 404 can be a display screen, etc. The memory 405 can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The memory 405 can optionally be at least one storage device located away from the aforementioned processor 401. The processor 401 can be combined with Figure 3 In the described apparatus, a set of program codes is stored in the memory 405, and the processor 401, the input device 403, and the output device 404 call the program codes stored in the memory 405 to perform the following operations:

[0122] Processor 401, used to receive an execution instruction for a program code;

[0123] Processor 401 is used to obtain an encapsulated field in a program code, wherein the encapsulated field is a field that is encapsulated with characteristic information of the program code and displayed in code form, and the characteristic information is used to indicate at least one of a version characteristic of the program code, a running environment characteristic of the program code, and a user characteristic of developing the program code;

[0124] Processor 401, configured to parse the encapsulation field to obtain feature information corresponding to the encapsulation field;

[0125] The processor 401 is configured to run the program code and obtain running information of the program code, wherein the running information is used to indicate features of an account running the program code;

[0126] Processor 401 is used to upload the operation information and the characteristic information to the blockchain after pre-processing.

[0127] In one implementation, the processor 401 is specifically configured to:

[0128] Obtain characteristic information of program code;

[0129] Encapsulating the characteristic information to obtain an encapsulation field corresponding to the characteristic information, wherein the format of the encapsulation field is a code format;

[0130] An adding position for the encapsulation field is determined from the program code, and the encapsulation field is added to the adding position in the program code.

[0131] In one implementation, the processor 401 is specifically configured to:

[0132] Detecting the type to which each phrase in the feature information belongs;

[0133] Encapsulate each phrase in the feature information using an encapsulation method corresponding to the type to which each phrase belongs, to obtain an encapsulation subfield corresponding to each phrase;

[0134] Adding a corresponding identifier to each encapsulation subfield based on the type to which each phrase belongs, to obtain a target encapsulation subfield corresponding to each phrase, wherein the identifier is used to indicate an encapsulation mode corresponding to the encapsulation subfield and a type to which the phrase corresponding to the encapsulation subfield belongs;

[0135] The target encapsulation subfields are merged to obtain an encapsulation field corresponding to the characteristic information.

[0136] In one implementation, the processor 401 is specifically configured to:

[0137] Obtaining an identifier in each target encapsulation subfield in the encapsulation field;

[0138] Determine a decapsulation mode for each target encapsulation subfield based on the identifier in each target encapsulation subfield;

[0139] Decapsulating each target encapsulation subfield using the decapsulation method of each target encapsulation subfield to obtain a phrase corresponding to each target encapsulation subfield;

[0140] The phrases corresponding to the target encapsulation sub-fields are merged to obtain characteristic information corresponding to the encapsulation field.

[0141] In one implementation, the processor 401 is specifically configured to:

[0142] Acquire necessary fields required for the program code to run from the characteristic information, and the placement positions of the necessary fields in the program code;

[0143] The necessary fields are added to the placement location, and the program code after the necessary fields are added is run.

[0144] In one implementation, the processor 401 is specifically configured to:

[0145] Displaying a program interface corresponding to the program code;

[0146] Receiving a query instruction input for a target area in the program interface, wherein the target area includes a button area, an image area or a text area, and the query instruction is used to query target feature information corresponding to the target area;

[0147] Acquire a target program code module corresponding to the target area, and find a corresponding target encapsulation field from the target program code module;

[0148] Target feature information corresponding to the target area is obtained from the target encapsulation field.

[0149] In one implementation, the processor 401 is specifically configured to:

[0150] Obtaining a preset information storage table, wherein the information storage table is used to store the operation information and the characteristic information;

[0151] Determine the storage position of each character in the operation information and the characteristic information in the information storage table based on the types of different characters in the operation information and the characteristic information;

[0152] Based on the storage position of each character, the operation information and each character in the feature information are stored in the information storage table to obtain a target information storage table;

[0153] Broadcasting the target information storage table in the blockchain so that each node in the blockchain performs consensus verification on the target information storage table;

[0154] When the consensus check is passed, the target information storage table is packaged into blocks, and the blocks are stored in the blockchain.

[0155] In an embodiment of the present invention, the processor 401 receives an execution instruction for a program code, obtains an encapsulated field in the program code, parses the encapsulated field, obtains characteristic information corresponding to the encapsulated field, executes the program code, and obtains the execution information of the program code, and uploads the execution information and characteristic information to the blockchain after preprocessing, wherein the encapsulated field is a field in which the characteristic information of the program code is encapsulated and displayed in the form of code, the characteristic information is used to indicate at least one of the version characteristics of the program code, the operating environment characteristics of the program code, and the user characteristics of the development program code, and the execution information is used to indicate the account characteristics of the running program code. By implementing the above method, the encapsulated field in the program code can be parsed to obtain the characteristic information of the program code, thereby improving the traceability of the program code and the intelligence of the terminal.

[0156] The modules described in the embodiments of the present invention may be implemented by a general integrated circuit, such as a CPU (Central Processing Unit), or by an ASIC (Application Specific Integrated Circuit).

[0157] It should be understood that in the embodiment of the present invention, the processor 401 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0158] The bus 402 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus 402 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 It is represented by only one thick line, but it does not mean that there is only one bus or one type of bus.

[0159] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The computer storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0160] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A program information processing method, characterized in that: The method comprises: Receiving an execution instruction for a program code; Acquire an encapsulated field in the program code, wherein the encapsulated field is a field that is encapsulated with characteristic information of the program code and displayed in code form, and the characteristic information is used to indicate the characteristics of a user who develops the program code; the encapsulated field includes special characters, and the encapsulated field is acquired by traversing the special characters in the program code; or the format of the encapsulated field satisfies the alternation of uppercase letters and lowercase letters, and the encapsulated field is acquired by detecting a field in the program code that satisfies the alternation of uppercase letters and lowercase letters; or the encapsulated field is acquired by acquiring an acquisition method for the encapsulated field in the program code from a source address of the program code, and based on the acquisition method; The encapsulation field is parsed using the decapsulation method corresponding to the encapsulation field to obtain characteristic information corresponding to the encapsulation field; the decapsulation method corresponds to the encapsulation method of the encapsulation field, the encapsulation method is determined based on the type of the phrase in the characteristic information, and different types correspond to different encapsulation methods; Running the program code and obtaining running information of the program code, wherein the running information is used to indicate the characteristics of the account running the program code; the program code includes a trigger script, and the trigger script is used to indicate that when the running of the program code is detected, the running information and the characteristic information are pre-processed and uploaded; The operation information and the characteristic information are pre-processed and uploaded to the blockchain; the pre-processing includes: obtaining a preset information storage table, the information storage table is used to associate and store the operation information and the characteristic information; based on the types of different characters in the operation information and the characteristic information, determining the storage position of each character in the operation information and the characteristic information in the information storage table; based on the storage position of each character, encapsulating each character in the operation information and the characteristic information and storing them in the information storage table to obtain a target information storage table; Before receiving the execution instruction for the program code, the method further includes: Acquire characteristic information of the program code, and detect the type to which each phrase in the characteristic information belongs; Encapsulate each phrase in the feature information using an encapsulation method corresponding to the type to which each phrase belongs, to obtain an encapsulation subfield corresponding to each phrase; Adding a corresponding identifier to each encapsulation subfield based on the type to which each phrase belongs, to obtain a target encapsulation subfield corresponding to each phrase, wherein the identifier is used to indicate the encapsulation mode corresponding to the encapsulation subfield and the type to which the phrase corresponding to the encapsulation subfield belongs; Merging each target encapsulation subfield to obtain an encapsulation field corresponding to the characteristic information, wherein the format of the encapsulation field is a code format; An adding position for the encapsulation field is determined from the program code, and the encapsulation field is added to the adding position in the program code.

2. The method according to claim 1, characterized in that The step of parsing the encapsulated field by using the decapsulation method corresponding to the encapsulated field to obtain characteristic information corresponding to the encapsulated field includes: Obtaining an identifier in each target encapsulation subfield in the encapsulation field; Determine a decapsulation mode for each target encapsulation subfield based on the identifier in each target encapsulation subfield; Decapsulating each target encapsulation subfield using the decapsulation method of each target encapsulation subfield to obtain a phrase corresponding to each target encapsulation subfield; The phrases corresponding to the target encapsulation sub-fields are merged to obtain characteristic information corresponding to the encapsulation field.

3. The method according to claim 1, characterized in that The characteristic information also includes necessary fields required for the program code to run and the placement positions of the necessary fields in the program code. Running the program code includes: Acquire necessary fields required for the program code to run from the characteristic information, and the placement positions of the necessary fields in the program code; The necessary fields are added to the placement location, and the program code after the necessary fields are added is run.

4. The method according to claim 1, characterized in that: The program code includes at least one program code module, each program code module includes a corresponding encapsulation field, and after running the program code, the method further includes: Displaying a program interface corresponding to the program code; Receiving a query instruction input for a target area in the program interface, wherein the target area includes a button area, an image area or a text area, and the query instruction is used to query target feature information corresponding to the target area; Acquire a target program code module corresponding to the target area, and find a corresponding target encapsulation field from the target program code module; Target feature information corresponding to the target area is acquired from the target encapsulation field, and the target feature information is displayed in the program interface.

5. The method according to claim 1, characterized in that The pre-processing of the operation information and the characteristic information and uploading them to the blockchain includes: Broadcasting the target information storage table in the blockchain so that each node in the blockchain performs consensus verification on the target information storage table; When the consensus check is passed, the target information storage table is packaged into blocks, and the blocks are stored in the blockchain.

6. A program information processing device, characterized in that: The device comprises: A receiving module, used for receiving an operating instruction for a program code; an acquisition module, configured to acquire an encapsulated field in the program code, wherein the encapsulated field is a field that is displayed in code form after encapsulating characteristic information of the program code, and the characteristic information is used to indicate characteristics of a user who develops the program code; the encapsulated field includes special characters, and the encapsulated field is acquired by traversing the special characters in the program code; or the format of the encapsulated field satisfies the alternation of uppercase letters and lowercase letters, and the encapsulated field is acquired by detecting a field in the program code that satisfies the alternation of uppercase letters and lowercase letters; or the encapsulated field is acquired by acquiring an acquisition method for the encapsulated field in the program code from a source address of the program code, and based on the acquisition method; A parsing module, used to parse the encapsulation field using the decapsulation method corresponding to the encapsulation field to obtain characteristic information corresponding to the encapsulation field; the decapsulation method corresponds to the encapsulation method of the encapsulation field, the encapsulation method is determined based on the type of the phrase in the characteristic information, and different types correspond to different encapsulation methods; A running module, used to run the program code and obtain the running information of the program code, wherein the running information is used to indicate the characteristics of the account running the program code; the program code includes a trigger script, and the trigger script is used to indicate that when the program code is detected to be running, the running information and the characteristic information are pre-processed and uploaded; An uploading module is used to upload the operation information and the feature information to the blockchain after preprocessing; the preprocessing includes: obtaining a preset information storage table, the information storage table is used to associate and store the operation information and the feature information; based on the types of different characters in the operation information and the feature information, determining the storage position of each character in the operation information and the feature information in the information storage table; based on the storage position of each character, encapsulating each character in the operation information and the feature information and storing them in the information storage table to obtain a target information storage table; The acquisition module is also used to acquire characteristic information of the program code and detect the type to which each phrase in the characteristic information belongs; encapsulate each phrase in the characteristic information using the encapsulation method corresponding to the type to which each phrase belongs, and obtain the encapsulation subfield corresponding to each phrase; add a corresponding identifier to each encapsulation subfield based on the type to which each phrase belongs, and obtain the target encapsulation subfield corresponding to each phrase, wherein the identifier is used to indicate the encapsulation method corresponding to the encapsulation subfield and the type to which the phrase corresponding to the encapsulation subfield belongs; merge each target encapsulation subfield to obtain the encapsulation field corresponding to the characteristic information, wherein the format of the encapsulation field is a code format; determine the adding position for the encapsulation field from the program code, and add the encapsulation field to the adding position in the program code.

7. A terminal, characterized in that: The method comprises a processor, an input device, an output device and a memory, wherein the processor, the input device, the output device and the memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 5.