CN118567681A - Data updating method, device, equipment and storage medium - Google Patents
Data updating method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN118567681A CN118567681A CN202410714808.XA CN202410714808A CN118567681A CN 118567681 A CN118567681 A CN 118567681A CN 202410714808 A CN202410714808 A CN 202410714808A CN 118567681 A CN118567681 A CN 118567681A
- Authority
- CN
- China
- Prior art keywords
- resource
- version
- resource module
- module
- blockchain network
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F16/2471—Distributed queries
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Fuzzy Systems (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Computational Linguistics (AREA)
- Probability & Statistics with Applications (AREA)
- Mathematical Physics (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application discloses a data updating method, a device, equipment and a storage medium, and relates to the technical field of computers, wherein the method comprises the following steps: acquiring a diagnostic box serial number input by a user, and judging whether a resource packet corresponding to the diagnostic box serial number exists or not, wherein the resource packet comprises a plurality of resource modules; if so, sending a query request to a blockchain network so that the blockchain network queries to obtain version update information of each resource module based on the query request; acquiring version update information of each resource module returned by the block chain network; if the version updating information shows that the version of the relevant resource module in the blockchain network is updated, a resource module downloading request of the latest version is sent to the blockchain network, so that the blockchain network searches for the resource module of the latest version based on the resource module downloading request and returns the resource module, and the reliability and confidentiality of data on diagnostic equipment can be improved.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for updating data.
Background
With the continuous development of vehicle technology and the increasing complexity of vehicle systems, vehicle diagnostic systems also require continuous data updating.
Version update information of the current diagnostic equipment is stored in a centralized database or a server, and data can be tampered or accessed without authorization in the process of data update, so that the credibility and confidentiality of the data on the diagnostic equipment are reduced.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present application and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The application mainly aims to provide a data updating method, a device, equipment and a storage medium, which aim to solve the technical problems of low credibility and confidentiality of data on the existing diagnostic equipment.
In order to achieve the above object, the present application provides a data updating method applied to a diagnostic device, the method comprising:
acquiring a diagnostic box serial number input by a user, and judging whether a resource packet corresponding to the diagnostic box serial number exists or not, wherein the resource packet comprises a plurality of resource modules;
If so, sending a query request to a blockchain network so that the blockchain network queries to obtain version update information of each resource module based on the query request;
acquiring version update information of each resource module returned by the block chain network;
And if the version updating information shows that the version of the related resource module in the blockchain network is updated, sending a resource module downloading request of the latest version to the blockchain network so that the blockchain network searches for the resource module of the latest version based on the resource module downloading request and returns the resource module.
In one embodiment, if the version update information indicates that the version of the related resource module in the blockchain network is updated, the step of sending the latest version of the resource module download request to the blockchain network includes:
and covering the original resource module with the resource module of the latest version.
In an embodiment, the step of obtaining the serial number of the diagnostic box input by the user and judging whether the resource packet corresponding to the serial number of the diagnostic box exists further includes:
if not, sending a resource packet downloading request to the blockchain network, wherein the resource packet downloading request comprises the diagnostic box serial number;
and acquiring a resource packet returned by the block chain network, wherein the resource packet returned by the block chain network comprises a plurality of resource modules of the latest version.
In an embodiment, the step of covering the original resource module with the latest version of the resource module further includes:
Responding to the diagnostic box switching instruction, acquiring a new diagnostic box serial number input by the user, and executing the steps: judging whether a resource packet corresponding to the serial number of the diagnostic box exists or not, wherein the resource packet comprises a plurality of resource modules.
The application also provides a data updating method applied to the block chain network, which comprises the following steps:
Acquiring a query request sent by a diagnostic equipment end, wherein the query request is sent by the diagnostic equipment end after acquiring a diagnostic box serial number input by a user and judging that a resource packet corresponding to the diagnostic box serial number exists, and the resource packet comprises a plurality of resource modules;
inquiring to obtain version update information of each resource module based on the inquiry request;
returning version update information of each resource module to the diagnosis equipment end;
Acquiring the resource module downloading request sent by the diagnostic equipment end, wherein the resource module downloading request is sent by the diagnostic equipment end when the version updating information shows that the version of the resource module is updated;
searching to obtain the latest version of the resource module based on the resource module downloading request;
and returning the latest version of the resource module to the diagnosis equipment end.
In one embodiment, the query request includes the diagnostic box serial number and current version information of each of the resource modules, and the step of querying for version update information of each of the resource modules based on the query request includes:
Inquiring from a preset index table based on the serial number of the diagnostic box to obtain a hash value of a corresponding resource packet;
Inquiring from a preset version linked list based on the hash value of the resource packet to obtain an update record of each resource module in the resource packet;
comparing the current version information of each resource module with the update record to generate version update information of each resource module.
In one embodiment, the step of searching for the latest version of the resource module based on the resource module download request includes:
searching the hash value of the resource module of the latest version from the version linked list based on the hash value of the resource packet;
positioning a block where the resource module of the latest version is located based on the hash value of the resource module of the latest version through a block chain browser;
And searching the latest version of the resource module based on the block.
In addition, in order to achieve the above object, the present application further provides a data updating apparatus, provided at a diagnostic device end, the apparatus comprising:
The query module is used for acquiring a diagnostic box serial number input by a user and judging whether a resource packet corresponding to the diagnostic box serial number exists or not, wherein the resource packet comprises a plurality of resource modules; if so, sending a query request to a blockchain network so that the blockchain network queries to obtain version update information of each resource module based on the query request;
The downloading module is used for acquiring version updating information of each resource module returned by the blockchain network; and if the version updating information shows that the version of the related resource module in the blockchain network is updated, sending a resource module downloading request of the latest version to the blockchain network so that the blockchain network searches for the resource module of the latest version based on the resource module downloading request and returns the resource module.
In addition, to achieve the above object, the present application also proposes a data updating apparatus, the apparatus comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the data update method as described above.
In addition, to achieve the above object, the present application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the data updating method as described above.
One or more technical schemes provided by the application have at least the following technical effects:
The application can ensure that the version update information of the resource module is credible, public and not easy to tamper by storing the information on the blockchain, thereby improving the credibility and confidentiality of the data on the diagnosis equipment.
And, the decentralization characteristic and encryption mechanism of the blockchain technology ensure the security of the serial number of the diagnostic box and the related resource information. The user entered serial number can be verified on the blockchain to prevent counterfeiting or tampering.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flowchart of a data update method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a second embodiment of a data updating method according to the present application;
FIG. 3 is a schematic flow chart of a third embodiment of a data updating method according to the present application;
FIG. 4 is a flowchart of a data update method according to a fourth embodiment of the present application;
FIG. 5 is a flowchart of a fifth embodiment of a data update method according to the present application;
FIG. 6 is a flowchart of a data update method according to a sixth embodiment of the present application;
FIG. 7 is a schematic flow chart of a seventh embodiment of a data updating method according to the present application;
FIG. 8 is a schematic block diagram of a data update apparatus according to an embodiment of the present application;
fig. 9 is a schematic device structure diagram of a hardware running environment related to a data updating method in an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the technical solution of the present application and are not intended to limit the present application.
For a better understanding of the technical solution of the present application, the following detailed description will be given with reference to the drawings and the specific embodiments.
The main solutions of the embodiments of the present application are: acquiring a diagnostic box serial number input by a user, and judging whether a resource packet corresponding to the diagnostic box serial number exists or not, wherein the resource packet comprises a plurality of resource modules; if so, sending a query request to a blockchain network so that the blockchain network queries to obtain version update information of each resource module based on the query request; acquiring version update information of each resource module returned by the block chain network; and if the version updating information shows that the version of the related resource module in the blockchain network is updated, sending a resource module downloading request of the latest version to the blockchain network so that the blockchain network searches for the resource module of the latest version based on the resource module downloading request and returns the resource module.
Technical terms related to the embodiment of the invention:
a blockchain browser: the blockchain browser (Blockchain Explorer) is a tool or service for viewing and browsing data on the blockchain. It allows the user to view transactions, blocks, address balances, and other relevant information on the blockchain. Blockchain browsers typically provide a user-friendly interface and search functionality whereby a user can find a particular transaction or information by entering a transaction hash, address, or keyword.
In this embodiment, for convenience of description, the following description will be made with the data update system as the execution subject.
Since version update information of the diagnostic device in the prior art is stored in a centralized database or server, the data may be tampered or unauthorized accessed during the data update process, and the credibility and confidentiality of the data on the diagnostic device are reduced.
The present application provides a solution that ensures that version update information of resource modules is trusted, published, and not easily tampered with by storing such information on the blockchain, thereby improving the trustworthiness and confidentiality of data on the diagnostic device.
And, the decentralization characteristic and encryption mechanism of the blockchain technology ensure the security of the serial number of the diagnostic box and the related resource information. The user entered serial number can be verified on the blockchain to prevent counterfeiting or tampering.
It should be noted that, the execution body of the embodiment may be a computing service device having functions of data processing, network communication and program running, such as a tablet computer, a personal computer, a mobile phone, or an electronic device, a data updating device, or the like, which can implement the above functions. The present embodiment and the following embodiments will be described below with reference to a data update system.
Based on this, an embodiment of the present application provides a data updating method, and referring to fig. 1, fig. 1 is a schematic flow chart provided by an embodiment of the data updating method of the present application.
In this embodiment, the data updating method is applied to a diagnostic device side, and includes steps S10 to S40:
step S10, obtaining a diagnostic box serial number input by a user, and judging whether a resource packet corresponding to the diagnostic box serial number exists or not, wherein the resource packet comprises a plurality of resource modules;
It should be noted that one diagnostic device may be connected to different diagnostic cartridges. The diagnostic equipment side acquires the diagnostic box serial number input by the user and can load relevant resource data.
Additionally, it should be noted that the resource packages include, but are not limited to, the following resource modules: a. large picture resource module (such as APP starting page, background page), b. Application function resource module (home page, more function page, diagnosis small tool), c. Software menu module (diagnosis software menu, special function menu, etc.), d. Expansion module (ADAS, endoscope, etc.), e. Personal information module;
Wherein the resource modules required by different diagnostic cartridges and the versions of the resource modules are different.
In addition, as an embodiment, a naming convention may be employed in designing the resource package to include the diagnostic box serial number in the name of the resource package. For example, the naming of the resource package may be in the format of "serial number_version number", where the serial number portion is the serial number of the diagnostic box. After the user inputs the serial number of the diagnostic box on the diagnostic device, the diagnostic device constructs a resource package name according to the serial number input by the user, and searches the local storage for the existence of a matching resource package name.
Step S40, if yes, a query request is sent to a blockchain network, so that the blockchain network queries based on the query request to obtain version update information of each resource module;
If the resource packet corresponding to the diagnostic serial number exists in the diagnostic equipment end, the resource packet corresponding to the diagnostic serial number is downloaded before, and when the user inputs the diagnostic box serial number again, only the latest version of the corresponding resource version needs to be checked.
As one embodiment, the query request may include a diagnostic box serial number and a diagnostic device serial number, such that the blockchain queries for version update information for the resource module in the current diagnostic device based on the diagnostic box serial number in the query request.
Specifically, the blockchain network stores not only the version update record of the resource module corresponding to the serial number of the diagnostic box, but also the current version information of the resource module corresponding to the diagnostic box in the diagnostic equipment.
And then, comparing the current version information with the version update record by the blockchain network to obtain the version update information of the resource module in the current diagnostic equipment.
For example, there is a diagnostic device A, B, C, taking the diagnostic device a as an example, the diagnostic device a is loaded with related resource modules of diagnostic boxes a, b, c, taking the related resource modules of diagnostic box a and diagnostic box b as examples, the related resource modules of diagnostic box a loaded by the diagnostic device a are large picture resource modules and application function resource modules, and the version numbers of the related resource modules are 1.0 and 3.0 respectively; the relevant resource modules of the diagnosis box B loaded by the diagnosis device B are a software menu module and an extension module, and the version numbers of the software menu module and the extension module are 1.0 and 4.0 respectively.
In the blockchain network, not only the version update record of the relevant resource module of the diagnosis box a, b, c is stored, but also the current version information of the relevant resource module of the downloaded diagnosis box a, b, c in the diagnosis device a is stored.
Taking diagnostic box a as an example, storing version update records for its associated resource modules in a blockchain network is described below:
the version update record of the large picture resource module of diagnostic box a is as follows:
(1) Version 1.0 (release on 10 th 1/2001), the new function optimizes the picture loading speed.
(2) Version 2.0 (release 1 in 2002), the new functionality supports high definition picture display.
(3) Version 3.0 (release 7.3 in 2002) failed to fix the problem picture.
The update record of the application function resource module of the diagnostic box b is as follows:
(1) Version 1.0 (release 1, 10, 2001) adds new functional basic diagnostic functions.
(2) Version 2.0 (release 1 in 2002, 2 months), new functionality remote data transfer functionality.
(3) Version 3.0 (release 7.3 in 2002) remedies security threats in the process of problem data transmission.
(4) Version 4.0 (release 1/2/2003), new functionality real-time data analysis and report generation.
As another embodiment, the blockchain network stores version update records of resource modules corresponding to serial numbers of diagnostic boxes, but does not store current version information of the resource modules corresponding to the diagnostic boxes in the current diagnostic device. The diagnostic equipment firstly acquires the version information of the current resource module, and then sends a query request to the blockchain network, wherein the query request comprises the current version information of each resource module, so that the blockchain network compares the current version information of each resource module with the update record to generate version update information of each resource module.
Step S50, version update information of each resource module returned by the block chain network is obtained;
The version update information notes the information of the resource module with the difference between the current version information and the version update record.
Step S60, if the version update information shows that the version of the relevant resource module in the blockchain network is updated, a resource module downloading request of the latest version is sent to the blockchain network, so that the blockchain network searches for the resource module of the latest version based on the resource module downloading request and returns.
It should be noted that, the latest version of the resource module download request sent by the diagnostic device may include the serial number of the diagnostic box, the serial number of the diagnostic device, and the latest version number of the relevant resource module.
The embodiment provides a data updating method, which can ensure that the version updating information of the resource module is credible and public and is not easy to tamper by storing the version updating information on a blockchain, thereby improving the credibility and confidentiality of data on diagnostic equipment.
And, the decentralization characteristic and encryption mechanism of the blockchain technology ensure the security of the serial number of the diagnostic box and the related resource information. The user entered serial number can be verified on the blockchain to prevent counterfeiting or tampering.
In the second embodiment of the present application, the same or similar content as that of the first embodiment can be referred to the description above, and the description is omitted. On this basis, referring to fig. 2, step S60, if the version update information indicates that the version of the related resource module in the blockchain network is updated, further includes step S70 after sending the latest version of the resource module download request to the blockchain network:
and step S70, covering the original resource module with the resource module of the latest version.
It should be noted that, before performing the overlay operation, the currently running resource module is stopped to avoid a conflict or data loss in the update process.
As an embodiment, a backup of the original resource module is performed before the overlay so that the original resource module can be restored to the previous state when a problem occurs in the update process.
And then, the downloaded resource module file of the latest version is covered on the original resource module file, so that the file path and naming standards are ensured to be correct.
After confirming that the overlay operation is completed, the updated resource module is started and necessary configuration and settings are made.
And system test and verification can be performed to ensure that the updated resource module can normally operate and check whether any incompatibility or error condition exists.
The user may be informed about the update and impact of the resource module and how to use the new version of the resource module, if desired.
According to the embodiment of the invention, the resource module of the latest version is covered with the original resource module, so that the known problems and vulnerabilities can be repaired, new functions and improvements can be introduced, and the experience and satisfaction of users are improved.
In the third embodiment of the present application, the same or similar contents as those of the above embodiment can be referred to the above description, and the description is omitted. On this basis, referring to fig. 3, step S10, after obtaining the serial number of the diagnostic box input by the user and determining whether there is a resource packet corresponding to the serial number of the diagnostic box, further includes steps S20 to S30:
step S20, if not, a resource package downloading request is sent to the blockchain network, wherein the resource package downloading request comprises the serial number of the diagnostic box;
Step S30, obtaining a resource packet returned by the block chain network, wherein the resource packet returned by the block chain network comprises a plurality of resource modules of the latest version.
And if the diagnostic equipment does not have the resource packet corresponding to the serial number of the diagnostic box, downloading the resource packet containing the corresponding resource module of the latest version to the blockchain.
According to the embodiment of the invention, the diagnosis equipment can acquire the latest version of the resource module by sending the resource package downloading request to the blockchain network, so that the equipment software and the data resource are kept updated.
In the fourth embodiment of the present application, the same or similar contents as those of the third embodiment can be referred to the description above, and the description is omitted. On this basis, referring to fig. 4, step S70 further includes step S80 after covering the original resource module with the latest version of the resource module:
Step S80, responding to the diagnosis box switching instruction, acquiring a new diagnosis box serial number input by the user, and executing the steps: judging whether a resource packet corresponding to the serial number of the diagnostic box exists or not, wherein the resource packet comprises a plurality of resource modules.
Wherein the user can click a button to switch the diagnostic box and then enter a new diagnostic box serial number. At this time, the diagnostic apparatus again judges whether or not there is a resource packet corresponding to the new diagnostic box serial number.
If so, the diagnostic equipment sends a query request to the blockchain network so as to query the blockchain network to obtain version update information of each resource module corresponding to the new diagnostic box serial number. The diagnostic equipment acquires version update information of each resource module, and if the version update information shows that the versions of some resource modules in the blockchain network are updated, a latest version of resource module downloading request is sent to the blockchain network, so that the blockchain network searches for the latest version of resource module based on the downloading request and returns.
If the resource packet is not available, the diagnostic equipment sends a resource packet downloading request to the blockchain network, wherein the resource packet downloading request comprises a new diagnostic box serial number, and then, a resource packet returned by the blockchain network is obtained, and the resource packet comprises a plurality of resource modules of the latest version.
When a user switches the diagnostic box, the embodiment of the invention judges whether the resource packet corresponding to the serial number of the diagnostic box exists again, if so, checks whether the resource module in the resource packet is up to date, and if not, downloads the up to date resource module, thereby keeping the resource module in the diagnostic equipment up to date and ensuring the performance of the diagnostic equipment to be in an optimal state.
Referring to fig. 5, fig. 5 is a schematic flow chart of a fifth embodiment of the data updating method according to the present application.
In this embodiment, the data updating method is applied to a blockchain network, and includes steps S1000 to S6000:
Step S1000, obtaining a query request sent by a diagnostic equipment end, wherein the query request is sent by the diagnostic equipment end after obtaining a diagnostic box serial number input by a user and judging that a resource packet corresponding to the diagnostic box serial number exists, and the resource packet comprises a plurality of resource modules;
step S2000, inquiring to obtain version update information of each resource module based on the inquiry request;
Specifically, the query request includes a serial number of a diagnostic box, and the blockchain network queries a preset index table based on the serial number of the diagnostic box to obtain a hash value of a corresponding resource packet;
Then, inquiring from a preset version linked list based on the hash value of the resource packet to obtain an update record of each resource module in the resource packet;
And then comparing the current version information of each resource module with the update record to generate version update information of each resource module.
Step S3000, returning version update information of each resource module to the diagnostic equipment end;
the method comprises the steps that a blockchain network returns version update information of each resource module to a diagnosis device side, and if the version update information shows that the version of the relevant resource module in the blockchain network is updated, the diagnosis device side sends a resource module downloading request of the latest version to the blockchain network.
Step S4000, obtaining the resource module downloading request sent by the diagnostic equipment end, wherein the resource module downloading request is sent by the diagnostic equipment end when the version updating information shows that the version of the resource module is updated;
Step S5000, searching to obtain the latest version of the resource module based on the resource module downloading request;
Specifically, the blockchain network searches the hash value of the latest version of the resource module from the version linked list based on the hash value of the resource packet;
Then, positioning a block where the resource module of the latest version is located based on the hash value of the resource module of the latest version through a blockchain browser;
And obtaining the latest version of the resource module based on the block search.
And step S6000, returning the latest version of the resource module to the diagnosis equipment side.
After the diagnostic equipment side obtains the latest version of the resource module, the diagnostic equipment side stores or installs the latest version of the resource module according to the specific content of the resource module. For example, if the resource module is an application function resource module and an expansion module, installation is required; if the resource module is a static resource such as a large picture resource module, the installation is not needed.
The embodiment provides a data updating method, which can ensure that the version updating information of the resource module is credible and public and is not easy to tamper by storing the version updating information on a blockchain, thereby improving the credibility and confidentiality of data on diagnostic equipment.
And, the decentralization characteristic and encryption mechanism of the blockchain technology ensure the security of the serial number of the diagnostic box and the related resource information. The user entered serial number can be verified on the blockchain to prevent counterfeiting or tampering.
In the fifth embodiment of the present application, the same or similar contents as those of the fifth embodiment of the present application can be referred to the above description, and the following description is omitted. On this basis, the query request includes the serial number of the diagnostic box and the current version information of each resource module, please refer to fig. 6, step S2000, and the query request is based on the query request to obtain the version update information of each resource module, and further includes steps S2001-S2003:
Step S2001, inquiring from a preset index table based on the serial number of the diagnostic box to obtain a hash value of the corresponding resource packet;
The index table records the serial number of the diagnostic box and the hash value of the corresponding resource packet.
The hash value is a unique identifier of the resource packet, and can be used for verifying the integrity and accuracy of the resource packet.
Step S2002, inquiring from a preset version linked list based on the hash value of the resource packet to obtain an update record of each resource module in the resource packet;
each resource package is provided with a corresponding version linked list for recording update records of each resource module in the resource package.
Step S2003, comparing the current version information of each resource module with the update record, and generating version update information of each resource module.
The current version information of each resource module in the diagnostic box is compared with the update record queried in step S2002, so as to generate version update information of each resource module. The version update information may include a current version, a latest version, etc. of each resource module, for guiding a subsequent version update operation.
As an embodiment, the version update information may include only the current version and the latest version of the resource module to be updated.
According to the embodiment of the invention, the index table and the version linked list are arranged in the blockchain network, so that data can be managed more orderly, and the update records of each resource module can be searched and obtained more quickly.
In the seventh embodiment of the present application, the same or similar content as that of the fifth embodiment can be referred to the description above, and will not be repeated. On this basis, please refer to fig. 7, step S5000, which searches for the latest version of the resource module based on the resource module download request, further includes steps S5001 to S5003:
Step S5001, searching the hash value of the resource module of the latest version from the version linked list based on the hash value of the resource packet;
As an implementation manner, hash values of resource modules of different versions may be stored in the version linked list according to time sequence, for example, from the head end to the tail end of the linked list of the version linked list, and the version number corresponding to the resource module is from high to low.
Step S5002, positioning, by a blockchain browser, a block in which the latest version of the resource module is located based on the hash value of the latest version of the resource module;
it should be noted that, in the blockchain network, different versions of resource modules are distributed in different blocks.
Step S5003, obtaining the latest version of the resource module based on the block search.
Wherein, since the block only stores the latest version of the resource module, the latest version of the resource module can be directly obtained based on the block.
According to the embodiment of the invention, the hash value of the resource module of the latest version is obtained by the hash value of the head end in the version chain table, and the block of the resource module of the latest version is positioned based on the hash value by the block chain browser, so that the speed of inquiring the resource module in the block chain network is improved.
It should be noted that the foregoing examples are only for understanding the present application, and are not to be construed as limiting the data updating method of the present application, and that many forms of simple transformation based on the technical concept are within the scope of the present application.
The present application also provides a data updating apparatus, which is disposed at a diagnostic device end, referring to fig. 8, and includes:
The query module 10 is applied to acquiring a diagnostic box serial number input by a user and judging whether a resource packet corresponding to the diagnostic box serial number exists or not, wherein the resource packet comprises a plurality of resource modules; if so, sending a query request to a blockchain network so that the blockchain network queries to obtain version update information of each resource module based on the query request;
A download module 20, configured to obtain version update information of each of the resource modules returned by the blockchain network; and if the version updating information shows that the version of the related resource module in the blockchain network is updated, sending a resource module downloading request of the latest version to the blockchain network so that the blockchain network searches for the resource module of the latest version based on the resource module downloading request and returns the resource module.
The data updating device provided by the application can solve the technical problems of low credibility and confidentiality of the data on the current diagnosis equipment by adopting the data updating method in the embodiment. Compared with the prior art, the beneficial effects of the data updating device provided by the application are the same as those of the data updating method provided by the embodiment, and other technical features in the data updating device are the same as those disclosed by the method of the embodiment, and are not repeated here.
The present application provides a data updating apparatus, the data updating apparatus comprising: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the data updating method in the first embodiment.
Referring now to FIG. 9, a schematic diagram of a data update apparatus suitable for use in implementing embodiments of the present application is shown. The data update apparatus in the embodiment of the present application may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (Personal DIGITAL ASSISTANT: personal digital assistant), a PAD (Portable Application Description: tablet computer), a PMP (Portable MediaPlayer: portable multimedia player), a car-mounted terminal (e.g., car navigation terminal), etc., a fixed terminal such as a digital TV, a desktop computer, etc. The data updating apparatus shown in fig. 9 is merely an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present application.
As shown in fig. 9, the data updating apparatus may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access Memory (RAM: random AccessMemory) 1004. In the RAM1004, various programs and data required for the operation of the data update apparatus are also stored. The processing device 1001, the ROM1002, and the RAM1004 are connected to each other by a bus 1005. An input/output (I/O) interface 1006 is also connected to the bus. In general, the following systems may be connected to the I/O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, and the like; an output device 1008 including, for example, a Liquid crystal display (LCD: liquid CRYSTAL DISPLAY), a speaker, a vibrator, and the like; storage device 1003 including, for example, a magnetic tape, a hard disk, and the like; and communication means 1009. The communication means 1009 may allow the data updating device to communicate wirelessly or by wire with other devices to exchange data. While a data update device having various systems is shown in the figures, it should be understood that not all of the illustrated systems are required to be implemented or provided. More or fewer systems may alternatively be implemented or provided.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through a communication device, or installed from the storage device 1003, or installed from the ROM 1002. The above-described functions defined in the method of the disclosed embodiment of the application are performed when the computer program is executed by the processing device 1001.
The data updating device provided by the application can solve the technical problems of low credibility and confidentiality of the data on the current diagnosis device by adopting the data updating method in the embodiment. Compared with the prior art, the beneficial effects of the data updating device provided by the application are the same as those of the data updating method provided by the embodiment, and other technical features of the data updating device are the same as those disclosed by the method of the previous embodiment, and are not repeated here.
It is to be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the description of the above embodiments, particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon for performing the data updating method in the above-described embodiments.
The computer readable storage medium provided by the present application may be, for example, a U disk, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access Memory (RAM: random Access Memory), a Read-Only Memory (ROM: read Only Memory), an erasable programmable Read-Only Memory (EPROM: erasableProgrammable Read Only Memory or flash Memory), an optical fiber, a portable compact disc Read-Only Memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this embodiment, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: wire, fiber optic cable, RF (Radio Frequency), and the like, or any suitable combination of the foregoing.
The above-described computer-readable storage medium may be contained in a data updating apparatus; or may exist alone without being assembled into the data updating apparatus.
The computer-readable storage medium carries one or more programs that, when executed by a data updating apparatus, cause the data updating apparatus to: acquiring a diagnostic box serial number input by a user, and judging whether a resource packet corresponding to the diagnostic box serial number exists or not, wherein the resource packet comprises a plurality of resource modules; if so, sending a query request to a blockchain network so that the blockchain network queries to obtain version update information of each resource module based on the query request; acquiring version update information of each resource module returned by the block chain network; and if the version updating information shows that the version of the related resource module in the blockchain network is updated, sending a resource module downloading request of the latest version to the blockchain network so that the blockchain network searches for the resource module of the latest version based on the resource module downloading request and returns the resource module.
Computer program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of remote computers, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN: local Area Network) or a wide area network (WAN: wide Area Network), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Claims (10)
1. A data updating method, applied to a diagnostic device, the method comprising:
acquiring a diagnostic box serial number input by a user, and judging whether a resource packet corresponding to the diagnostic box serial number exists or not, wherein the resource packet comprises a plurality of resource modules;
If so, sending a query request to a blockchain network so that the blockchain network queries to obtain version update information of each resource module based on the query request;
acquiring version update information of each resource module returned by the block chain network;
And if the version updating information shows that the version of the related resource module in the blockchain network is updated, sending a resource module downloading request of the latest version to the blockchain network so that the blockchain network searches for the resource module of the latest version based on the resource module downloading request and returns the resource module.
2. The method of claim 1, wherein the step of sending the latest version of the resource module download request to the blockchain network if the version update information indicates that the version of the associated resource module in the blockchain network has been updated comprises:
and covering the original resource module with the resource module of the latest version.
3. The method of claim 2, wherein the step of obtaining the diagnostic box serial number entered by the user and determining whether the resource packet corresponding to the diagnostic box serial number exists further comprises:
if not, sending a resource packet downloading request to the blockchain network, wherein the resource packet downloading request comprises the diagnostic box serial number;
and acquiring a resource packet returned by the block chain network, wherein the resource packet returned by the block chain network comprises a plurality of resource modules of the latest version.
4. The method of claim 3, wherein the step of overlaying the latest version of the resource module over the original resource module further comprises:
Responding to the diagnostic box switching instruction, acquiring a new diagnostic box serial number input by the user, and executing the steps: judging whether a resource packet corresponding to the serial number of the diagnostic box exists or not, wherein the resource packet comprises a plurality of resource modules.
5. A method of data updating, for use in a blockchain network, the method comprising:
Acquiring a query request sent by a diagnostic equipment end, wherein the query request is sent by the diagnostic equipment end after acquiring a diagnostic box serial number input by a user and judging that a resource packet corresponding to the diagnostic box serial number exists, and the resource packet comprises a plurality of resource modules;
inquiring to obtain version update information of each resource module based on the inquiry request;
returning version update information of each resource module to the diagnosis equipment end;
Acquiring the resource module downloading request sent by the diagnostic equipment end, wherein the resource module downloading request is sent by the diagnostic equipment end when the version updating information shows that the version of the resource module is updated;
searching to obtain the latest version of the resource module based on the resource module downloading request;
and returning the latest version of the resource module to the diagnosis equipment end.
6. The method of claim 5, wherein the query request includes the diagnostic box serial number and current version information for each of the resource modules, and wherein querying for version update information for each of the resource modules based on the query request comprises:
Inquiring from a preset index table based on the serial number of the diagnostic box to obtain a hash value of a corresponding resource packet;
Inquiring from a preset version linked list based on the hash value of the resource packet to obtain an update record of each resource module in the resource packet;
comparing the current version information of each resource module with the update record to generate version update information of each resource module.
7. The method of claim 6, wherein the searching for the latest version of the resource module based on the resource module download request comprises:
searching the hash value of the resource module of the latest version from the version linked list based on the hash value of the resource packet;
positioning a block where the resource module of the latest version is located based on the hash value of the resource module of the latest version through a block chain browser;
And searching the latest version of the resource module based on the block.
8. A data updating apparatus, characterized by being provided at a diagnostic device side, comprising:
The query module is used for acquiring a diagnostic box serial number input by a user and judging whether a resource packet corresponding to the diagnostic box serial number exists or not, wherein the resource packet comprises a plurality of resource modules; if so, sending a query request to a blockchain network so that the blockchain network queries to obtain version update information of each resource module based on the query request;
The downloading module is used for acquiring version updating information of each resource module returned by the blockchain network; and if the version updating information shows that the version of the related resource module in the blockchain network is updated, sending a resource module downloading request of the latest version to the blockchain network so that the blockchain network searches for the resource module of the latest version based on the resource module downloading request and returns the resource module.
9. A data updating apparatus, the apparatus comprising: memory, a processor and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the data update method of any one of claims 1 to 4 or the data update method of any one of claims 5 to 7.
10. A storage medium, characterized in that the storage medium is a computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, realizes the steps of the data updating method according to any one of claims 1 to 4 or the data updating method according to any one of claims 5 to 7.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410714808.XA CN118567681A (en) | 2024-06-03 | 2024-06-03 | Data updating method, device, equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410714808.XA CN118567681A (en) | 2024-06-03 | 2024-06-03 | Data updating method, device, equipment and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN118567681A true CN118567681A (en) | 2024-08-30 |
Family
ID=92463555
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410714808.XA Pending CN118567681A (en) | 2024-06-03 | 2024-06-03 | Data updating method, device, equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN118567681A (en) |
-
2024
- 2024-06-03 CN CN202410714808.XA patent/CN118567681A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CA2794715C (en) | Search extensibility to third party applications | |
| US20180196665A1 (en) | Managing, using, and updating application resources | |
| KR102003850B1 (en) | Method for providing application and terminal thereof | |
| US8627284B2 (en) | Managed system extensibility | |
| WO2011055722A1 (en) | Information terminal device, information terminal management system, and storage medium in which program is stored | |
| US9292613B2 (en) | Generation of generic universal resource indicators | |
| CN111796865A (en) | Byte code file modification method and device, terminal equipment and medium | |
| CN112947956B (en) | Application software upgrading method | |
| JP2009259124A (en) | System and method for providing application update information | |
| CN118409915A (en) | CAN (controller area network) checksum script automatic generation method, device, equipment and storage medium | |
| US20250004757A1 (en) | Version management and releases of a software application | |
| CN118157957A (en) | Network security vulnerability scanning method, device, system, medium and electronic equipment | |
| CN111176705B (en) | Feature library upgrading method and device | |
| CN114880011A (en) | OTA (over the air) upgrading method and device, electronic equipment and readable storage medium | |
| CN118567681A (en) | Data updating method, device, equipment and storage medium | |
| CN113987471A (en) | Executable file execution method and device, electronic equipment and computer readable medium | |
| CN112559394B (en) | System library access method and device and electronic equipment | |
| US20240248945A1 (en) | Information display method and apparatus, terminal, and storage medium | |
| CN112015394B (en) | Android function module development method and device, computer system and storage medium | |
| CN115936724A (en) | Service processing method, device, storage medium and electronic device | |
| US20110138296A1 (en) | Method and device for browsing web page securely | |
| CN115168690B (en) | Data query method and device based on browser plug-in, electronic equipment and medium | |
| CN119621594B (en) | Method and device for parallel online operation and testing and debugging of authorization process | |
| CN116594630A (en) | File generation method, device, medium and electronic equipment | |
| CN120017512B (en) | Interface gateway nano-tube method, equipment and medium based on adapter plug-in mode |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |