A code library data storage method, system, electronic equipment and medium
By parsing the target product data file, adjusting the remote control parameters according to the device model and brand information, and generating adaptation parameters compatible with each model and brand, the problem of low accuracy of adaptation parameters in the existing technology is solved, and the automatic management and efficient storage of parameters are realized.
Patent Information
- Application Number
- CN202410915587.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2044-07-09
AI Technical Summary
The existing code library data storage method has low accuracy of adaptation parameters when adapting to different models of equipment, and cannot effectively meet the matching requirements of various models of equipment.
By parsing the data file of the target product, key parameters are obtained, and the parameters are adjusted one by one according to the device model and brand information, adaptation parameters compatible with each model and brand are generated and stored in the database.
It realizes the automatic extraction of remote control parameters and automatic adaptation and adjustment of device models and brands, improves the accuracy and adaptation precision of parameters, and ensures the persistent storage and unified management of parameters.
Smart Images

Figure CN118861144B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, system, electronic device and medium for storing code library data. Background Art
[0002] With the prevalence of mobile devices and IoT technology, remote control of various devices has become a part of daily life. In this context, code libraries—the libraries used for communication between remote controls and controlled devices—have become a critical component of device control. These libraries typically contain various signal codes for device control, such as commands for turning a device on / off and increasing or decreasing the volume. Device models, brands, and specifications are constantly changing, requiring frequent product adaptation and adjustment to meet the needs of various devices, with the adapted data stored in a database.
[0003] Currently, the existing method for storing adaptation parameters in a database is to establish a universal adaptation framework. By reading device information such as device model and brand, the product parameters are adjusted to adapt to different devices. However, in actual applications, different device models need to be adapted, and using a universal adaptation framework to adjust the adaptation parameters often results in low accuracy of the adapted parameters. Summary of the Invention
[0004] The present application provides a code library data storage method, system, electronic device and medium, which have the effect of adjusting adaptation parameters in combination with device models to improve the accuracy of adaptation parameters.
[0005] In a first aspect, the present application provides a method for storing code database data, comprising:
[0006] Obtaining a data file of a target product, parsing the data file, and obtaining key parameters;
[0007] Determine multiple device models that the target product can adapt to, and adjust the key parameters according to each of the device models to obtain first adaptation parameters corresponding to each of the device models;
[0008] adjusting each of the first adaptation parameters according to device brand information to obtain a target adaptation parameter, wherein the device brand information includes at least one device model;
[0009] The target adaptation parameters are stored in a database of the target product.
[0010] By employing the above technical solution, the target product's data file is parsed to obtain its key remote control coding parameters. The system then determines the multiple device models to be adapted, adjusts key parameters for each model individually, and generates first adaptation parameters that initially match each model, achieving automatic model-based adaptation. Based on these first adaptation parameters, device brand information is further incorporated. By adjusting and optimizing parameters across multiple models within a brand, target adaptation parameters are obtained that are highly compatible with all models of that brand. This achieves comprehensive adaptation for the same brand's product family. Parameters, optimized for both device model and brand, are written to a database for persistent storage, unified management, and effective utilization. This system automatically extracts key remote control parameters, automatically adapts and adjusts device models and brands, and uniformly manages parameter storage, improving the accuracy of adaptation parameters.
[0011] Optionally, according to each of the device models, determine the first main format, first main frequency, first main user code and first key code value corresponding to each of the device models; adjust the main format according to the first main format to obtain a second main format; adjust the main frequency according to the first main frequency to obtain a second main frequency; adjust the main user code and the key code value according to the first main user code and the first key code value to obtain a second main user code and a second key code value; and use the second main format, the second main frequency, the second main user code and the second key code value as the first adaptation parameter.
[0012] By adopting the above technical solution, the standard parameter format, frequency, user code and key code value corresponding to each model are queried and obtained. The original key parameters are adjusted accordingly based on the obtained standard parameters of each model, and the second main format, second main frequency, second main user code and second key code value that match each model are generated through conversion and calculation. These second parameters obtained by adjusting the standard parameters of each model are used as the first adaptation parameters corresponding to the model. By adopting the standard parameters of the target device model one by one to guide and adjust the original key parameters of the remote control, the first adaptation parameters that are highly matched with each model can be obtained. Compared with directly using the original key parameters, this adjustment generation guided by the model standard parameters can effectively improve the adaptation accuracy of the parameters to each model of equipment, and achieve the effect of automatically and efficiently generating the first adaptation parameters that can match the target device model.
[0013] Optionally, if the device brand information corresponding to each of the device models is the same brand, multiple brand device models are determined based on the device brand information; it is determined whether the first adaptation parameter matches each of the brand device models; if the first adaptation parameter matches each of the brand device models, the first adaptation parameter is used as the target adaptation parameter; if the first adaptation parameter does not match each of the brand device models, the first adaptation parameter is adjusted according to each of the brand device models to obtain the target adaptation parameter.
[0014] By adopting the above technical solution, multiple device models of the brand are determined based on the brand information. Then, it is determined whether the first adaptation parameter can directly match all models under the brand. If it can match, the first adaptation parameter is directly used as the target parameter without adjustment, which simplifies the parameter generation process. If it cannot match all models, the brand's coding characteristics, format standards and other information are collected, and the first adaptation parameter is corrected according to the brand standard requirements. After calculation and adjustment, the target adaptation parameter compatible with all models of the brand is generated. This solution achieves the technical effect of simplifying the parameter generation process while ensuring that the parameters are compatible with the brand standard. It takes into account the differences between brands, reduces unnecessary repeated adjustments, and improves the efficiency of parameter optimization generation.
[0015] Optionally, based on each of the brand device models, determine the first brand standard adaptation parameters corresponding to each of the brand device models; based on each of the brand standard adaptation parameters and the first adaptation parameters, determine the first adaptation parameter correction value corresponding to each of the brand device models; based on each of the first adaptation parameter correction values, determine the first target adaptation parameter correction value, and adjust the first adaptation parameter based on the first target adaptation parameter correction value to obtain the target adaptation parameter.
[0016] By adopting the above technical solution, the encoding standard parameters corresponding to each model of the brand are obtained. The difference between the first adaptation parameter and the standard parameter of each model is calculated to obtain the correction value of the first adaptation parameter for each model. The correction values of all models are counted, and the average value or weighted value is taken as the first target correction value. The first target correction value is used to uniformly adjust the first adaptation parameter to generate a target adaptation parameter compatible with all models of the brand. By determining the difference between the adaptation parameter and the brand standard to guide the parameter adjustment, and adopting the overall target correction value of the brand, the subtle differences between models within the brand can be effectively resolved, and the adaptation effect for all models of the brand can be achieved. Compared with direct adjustment, this solution realizes the quantification and directionality of parameter adjustment, and improves the accuracy and efficiency of parameter adaptation.
[0017] Optionally, if the device brand information corresponding to each device model is a different brand, determine whether the first adaptation parameters corresponding to each device model under the different brands are repeated; if there are repeated second adaptation parameters in each of the first adaptation parameters, adjust the second adaptation parameters according to the device model corresponding to the second adaptation parameter to obtain the target adaptation parameter; if there are no repeated first adaptation parameters, use the first adaptation parameter as the target adaptation parameter.
[0018] By adopting the above technical solution, it is determined whether there are duplications in the first adaptation parameters corresponding to different brands. If there are duplicate parameters, targeted adjustments are made based on the device model information corresponding to the parameter to eliminate duplications and generate new target parameters. If all first adaptation parameters are not repeated, these parameters are directly used as target parameters without adjustment. By determining the repeatability of the first adaptation parameters, the same parameters can be avoided from being reused by products of different brands, thereby ensuring the independence of the code library. Targeted adjustments to duplicate parameters can effectively resolve parameter conflicts between brands and distinguish the parameters of each brand from those of other brands. The effect of determinism and uniqueness of code library parameters in a cross-brand environment is achieved.
[0019] Optionally, based on the device model corresponding to the second adaptation parameter, determine the second brand standard adaptation parameters of different brands corresponding to each device model; based on each second brand standard adaptation parameter and the second adaptation parameter, determine the second adaptation parameter correction value of the device model corresponding to the second adaptation parameter; based on each second adaptation parameter correction value, determine the second target adaptation parameter correction value, and adjust the second adaptation parameter according to the second target adaptation parameter correction value to obtain the target adaptation parameter.
[0020] By adopting the above technical solution, the corresponding device model and brand are determined according to the repeated parameters, and the standard adaptation parameters of each brand are obtained. The deviation between the second adaptation parameter and the standard parameter of each brand is calculated to obtain the specific correction value of the second adaptation parameter for each brand. By combining multiple correction values, a second target correction value is determined. The second adaptation parameter is uniformly adjusted using the second target correction value to generate a target adaptation parameter that eliminates duplication. By calculating the quantitative benchmark for adjustment by comparing with the brand standard adaptation parameters and adopting a unified target correction value, the interference of repeated parameters on different brands can be effectively eliminated, so that the parameters of each brand remain independent and unique. The quantitative and standardized effects of repeated parameter processing in a cross-brand environment are achieved.
[0021] Optionally, it is determined whether the target adaptation parameter exceeds the preset standard parameter range; if the target adaptation parameter exceeds the preset standard parameter range, the step of adjusting the key parameter according to each device model is repeated.
[0022] By adopting the above technical solution, standard ranges for remote control coding parameters are preset, such as upper and lower frequency limits and the number of format bits. The generated target parameters are then compared against the standard ranges one by one to determine if they are within the range. If the target parameters exceed the preset standard range, they are considered non-standard and require re-entry into the parameter adjustment process for optimization. The parameter adjustment process is repeated until the generated target parameters meet the standard range requirements. By comparing and verifying against the preset standard range, unreasonable parameters can be prevented from being applied to the product, ensuring product accuracy and reliability.
[0023] In a second aspect of the present application, a code library data storage system is provided.
[0024] A data acquisition module is used to acquire data files of target products, parse the data files, and obtain key parameters;
[0025] a parameter matching module, configured to determine a plurality of device models to which the target product is compatible, and adjust the key parameters according to each of the device models to obtain a first adaptation parameter corresponding to each of the device models;
[0026] a parameter adjustment module, configured to adjust each of the first adaptation parameters according to device brand information to obtain a target adaptation parameter, wherein the device brand information includes at least one device model;
[0027] Data storage module, used to store the target adaptation parameters in the database of the target product
[0028] In a third aspect of the present application, an electronic device is provided.
[0029] A code library data storage system includes a memory, a processor, and a program stored in the memory and executable on the processor. The program can implement a code library data storage method when loaded and executed by the processor.
[0030] In a fourth aspect of the present application, a computer-readable storage medium is provided.
[0031] A computer-readable storage medium stores a computer program, which, when executed by a processor, enables the processor to implement a method for storing code library data.
[0032] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0033] 1. This application obtains the key remote control coding parameters of the product by parsing the data file of the target product. Then it determines the multiple device models that need to be adapted, and adjusts the key parameters one by one according to each model to generate the first adaptation parameters that preliminarily match each model, thereby achieving the effect of automatic adaptation according to the model. On the basis of the first adaptation parameters, the device brand information is further introduced, and through the parameter adjustment and optimization between multiple models under the brand, the target adaptation parameters that are highly compatible with each model of the brand are obtained. Comprehensive adaptation of the same brand series products is achieved. The parameters that have been dual-adapted and optimized for the device model and brand are written into the database for persistent storage, unified management and effective utilization of the parameters. The automatic extraction of key parameters of the remote control, automatic adaptation and adjustment of device models and brands, and unified management of parameter storage are achieved. The intelligence and automation level of parameter optimization generation can be improved, and the accuracy of adaptation parameters can be improved.
[0034] 2. This application obtains the encoding standard parameters corresponding to each model of the brand. Calculate the difference between the first adaptation parameter and the standard parameter of each model to obtain the correction value of the first adaptation parameter for each model. Count the correction values of all models, and take the average or weighted value as the first target correction value. Use the first target correction value to uniformly adjust the first adaptation parameter to generate target adaptation parameters that are compatible with all models of the brand. By determining the difference between the adaptation parameter and the brand standard to guide the parameter adjustment, and adopting the target correction value of the brand as a whole, the subtle differences between models within the brand can be effectively resolved, and the adaptation effect for all models of the brand can be achieved. Compared with direct adjustment, this solution realizes the quantification and directionality of parameter adjustment, and improves the accuracy and efficiency of parameter adaptation.
[0035] 3. This application presets the standard range of parameters for remote control coding, such as upper and lower frequency limits, format bit number, etc. The generated target parameters are compared with the standard range one by one to determine whether they are within the range. If the target parameter exceeds the preset standard range, it means that the parameter is not standardized and it is necessary to re-enter the parameter adjustment process for optimization and generation. Repeat the parameter adjustment process until the generated target parameter meets the standard range requirements. By comparing and verifying with the preset standard range, unreasonable parameters can be avoided from being applied to the product, ensuring the correctness and reliability of the product. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 This is a flowchart of a method for storing code library data provided in an embodiment of the present application.
[0037] Figure 2 This is a structural diagram of a code library data storage system disclosed in an embodiment of the present application.
[0038] Figure 3This is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application.
[0039] Description of reference numerals: 300, electronic device; 301, processor; 302, communication bus; 303, user interface; 304, network interface; 305, memory. DETAILED DESCRIPTION
[0040] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0041] In the description of the embodiments of this application, words such as "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "for example" or "for instance" in the embodiments of this application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "for example" or "for instance" is intended to present the relevant concepts in a concrete manner.
[0042] In the description of the embodiments of the present application, the term "multiple" means two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0043] In order to facilitate understanding of the method and system provided by the embodiments of the present application, before introducing the embodiments of the present application, the background of the embodiments of the present application is first introduced.
[0044] Currently, the existing method for storing data after adaptation is to establish a universal adaptation framework. By reading device information such as device model and brand, it automatically adjusts product parameters to adapt to different devices. However, in actual applications, the existing code library data storage method may require different parameters for adaptation when handling different devices. The universal adaptation framework is often unable to adapt to multiple device models, resulting in low accuracy of the adaptation parameters after adaptation.
[0045] This embodiment of the application discloses a method for storing code database data. By parsing the data file of a target product and adapting it to the parameters of the corresponding device model, the target product is matched with various devices in the market, and complete data is obtained and stored in the database. This method is mainly used to solve the problem of low accuracy when adapting parameters for different device models and storing them in the database.
[0046] After the above background content introduction, those skilled in the art can understand the problems existing in the prior art. The technical solutions in the embodiments of the present application will be described in detail below in conjunction with the drawings in the embodiments of the present application. The described embodiments are only part of the embodiments of the present application, not all of the embodiments.
[0047] Reference Figure 1 A method for storing code database data includes steps S10 to S40, specifically including the following steps:
[0048] S10: Obtain the data file of the target product, parse the data file, and obtain key parameters.
[0049] Among them, the target products refer to projectors, remote controls and other equipment on the market.
[0050] Key parameters refer to the parameters extracted from the target product's data file and used to describe the product's characteristics, mainly including: main format, main user code and key code value.
[0051] Main format: describes the signal encoding format used between the remote control and the controlled device, such as NEC format, RC5 format, etc.
[0052] Main frequency: describes the frequency used for communication between the remote control and the controlled device, such as 38KHz.
[0053] Master User Code: The user code of the remote control, used to distinguish different brands or models of controlled devices.
[0054] Key code value: The code value corresponding to different key functions, for example, volume up corresponds to code X, and volume down corresponds to code Y.
[0055] Specifically, the remote control data file for the target product is obtained from a local medium or network server. This file, typically stored in binary or text format, contains various parameter information describing the remote control's technical characteristics, such as the primary format, primary frequency, primary user code, and key code values. This data file serves as input for parsing and the basis for extracting key parameters. The parsing module is then called upon to fully interpret and parse the remote control data file. Specifically, the file type is determined. Using a parser corresponding to the corresponding format, the file structure is parsed item by item to retrieve the technical parameter information stored within. For example, the value of the primary format field is read to obtain the primary frequency parameter value. The parsed primary format, primary frequency, primary user code, and key code values are stored as structured variables. By parsing the remote control data file, a series of key technical parameters, including primary format, primary frequency, primary user code, and key code values, can be effectively obtained. These key parameters describe the core technical characteristics of the remote control and are the basis for encoding, decoding, and matching between different controlled devices. These key parameters can then be adjusted to achieve compatibility based on different device models and brands.
[0056] S20: Determine multiple device models that the target product can adapt to, adjust key parameters according to each device model, and obtain first adaptation parameters corresponding to each device model.
[0057] Specifically, different device brands and models often use different remote control encoding schemes, and directly using existing parameters may not be compatible. Specific device model information can be obtained from the product manual or device database. Based on each identified device model, the key remote control parameters previously analyzed need to be adjusted to accommodate these models. Specifically, this involves referring to the standard parameters corresponding to each device model. For example, model A uses NEC encoding and 38 kHz, while model B uses RC5 encoding and 40 kHz. By comparing these standard parameters, the adjustment amounts for the main format, main frequency, main user code, and key code values are calculated, and then converted to obtain the first adaptation parameters. By identifying multiple target device models and intelligently adjusting the key remote control parameters according to the parameter standards for each device model, a series of first adaptation parameters compatible with these models can be obtained. This provides a foundation for further optimizing the adaptation parameters based on brand information. The benefit of obtaining the first adaptation parameters is that they ensure matching with the specified device model, avoiding the inefficient manual debugging of each device model.
[0058] Based on the above embodiment, the specific steps of adjusting key parameters according to the device model include S21 to S22:
[0059] S21: Determine, according to each device model, a first main format, a first main frequency, a first main user code, and a first key code value corresponding to each device model.
[0060] Exemplarily, multiple device models that the target product needs to adapt to are determined, and the remote control coding format standard of each model is queried in turn to locate the main format, main frequency, main user code range, and key code value defined therein. The main format parameter value in the format standard corresponding to each model found is used as the first main format of the model, the frequency parameter as the first main frequency, the user code range as the first main user code, and the coding table as the first key code value. After a cyclic query, the first main format, first main frequency, first main user code, and first key code value corresponding to all device models are finally obtained. The values of these standard parameters are obtained in order to adjust the original parameters of the remote control with them as the expected target in the future, so that they match the standard parameters of different models and complete automatic adaptation. This step provides a basis for subsequent parameter adjustment by obtaining the standard parameters corresponding to the device model, so that the remote control can automatically match different models of devices without manual testing.
[0061] S22: adjusting the main format according to the first main format to obtain a second main format; adjusting the main frequency according to the first main frequency to obtain a second main frequency; adjusting the main user code and the key code value according to the first main user code and the first key code value to obtain a second main user code and a second key code value; and using the second main format, the second main frequency, the second main user code, and the second key code value as first adaptation parameters.
[0062] For example, after obtaining the first main format corresponding to each device model, it is necessary to adjust the original main format of the remote control according to these first main formats to obtain the second main format that is compatible with each device model. The main format is adjusted because devices of different brands and models may use different remote control coding formats, and directly applying the original main format of the remote control may not match them. The specific adjustment method is to compare the original main format of the remote control with the first main format corresponding to the device model to determine whether they are consistent. If they are inconsistent, the original main format is converted into a second main format that is compatible with the model based on the first main format of the unmatched device model through a format conversion algorithm or by querying the corresponding format conversion table. After comparing with the first main formats of all device models in turn, a set of second main formats that are compatible with each device model is finally obtained. The effect of completing the main format adjustment is that the remote control can match different device models that use different format standards without the need for manual debugging one by one, thereby improving matching efficiency.
[0063] After obtaining the first primary frequency corresponding to each device model, the remote control's original primary frequency needs to be adjusted based on these expected first primary frequencies to match the frequency requirements of different device models. This is because different device models often use different remote control communication frequencies. Directly using the remote control's original frequency may cause the signal to be unrecognizable by the device. Specifically, the remote control's original primary frequency is compared with the first primary frequency of each device model to determine whether they are consistent. If they are inconsistent, the converted frequency deviation value is calculated and used to adjust the remote control's original primary frequency to the second primary frequency adapted for that model. After comparing each of these frequencies with the first primary frequencies of all models, a set of second primary frequencies matching the communication frequencies of each device model is obtained.
[0064] After obtaining the first primary user code and first key code values corresponding to each device model, the remote control's original primary user code and key code values need to be adjusted based on these expected codes to obtain second primary user codes and second key code values that match the different models. User code and key code value adjustments are necessary because different device models may utilize different user code assignments and key codes. Simply using the remote control's original code values may not be able to communicate properly with the target device. The specific adjustment method compares the remote control's original primary user code with the first primary user code of each device model, identifies the difference, calculates the adjustment amount, and then converts the original primary user code to a second primary user code by the adjustment amount to match the target model. The original key code value table is then compared with the first key code value table of each model, identifies the difference, calculates the adjustment amount, and then adjusts the original key code value to a second key code value to match the function keys of the target device. After these adjustments are made, a set of second primary user codes and second key code values that match the user codes and key code values of multiple models is obtained. The result of this code value adjustment is that the remote control can be compatible with device models with different user code assignments and key codes, eliminating the need for manual debugging of each device. The obtained second main format, second main frequency, second main user code and second key code value are the first adaptation parameters.
[0065] S30: adjusting each first adaptation parameter according to the device brand information to obtain a target adaptation parameter, where the device brand information includes at least one device model.
[0066] Among them, the target adaptation parameters specifically refer to the remote control coding parameters obtained after preliminary adaptation of the device model and secondary adjustment of the brand information. The target adaptation parameters include: target main format, the coding format adapted to the target device after adjustment; target main frequency, the frequency parameter for communicating with the target device after adjustment; target main user code, the value matching the user code of the target device after adjustment; target key code value, the coding value table matching the key function of the target device after adjustment.
[0067] Specifically, determine the brand information corresponding to each device model. If they are the same brand, determine multiple device models of the brand by querying the historical model list of the brand. Compare the first adaptation parameter with the standard parameters of these models to determine whether they match. If they match directly, the first adaptation parameter can be used as the target parameter. If not, it is necessary to continue to collect information such as the remote control coding characteristics and standard parameters of the brand, and make corrections and adjustments to the first adaptation parameter according to the parameter characteristics of the brand. After calculation and conversion, the target adaptation parameter that is highly compatible with all models of the brand is finally obtained. Through secondary parameter tuning of brand information, the remote control can achieve full compatibility with all models of devices of a certain brand, not just corresponding to a specific model, which greatly improves the matching and adaptation effect. The output target parameter is the optimal adaptation parameter obtained through comprehensive optimization under the premise of ensuring the compatibility of the brand.
[0068] In an optional embodiment of the present application, if the device models are of different brands, the specific process for adjusting the first adaptation parameter includes: after adjusting the first adaptation parameter based on the brand information, further consideration is required for the possibility that the target device model corresponds to different brands. To avoid conflicts between different brands, it is necessary to determine whether the first adaptation parameters corresponding to the device models of different brands are repeated. The brand information corresponding to all device models is extracted to determine whether the brands are the same. After determining that there are duplicate second adaptation parameters in the first adaptation parameters for different brands, these duplicate parameters are disambiguated. Parameter adjustment is performed to ensure that the same parameter in the code library is not reused, thereby preventing the same code value from controlling devices of different brands. Based on the duplicate parameter, i.e., the second adaptation parameter, the corresponding device model information is determined. Based on this model information, the encoding characteristics and standard parameters of the brand to which each model belongs are queried. Based on the differences between the standard parameters of different brands, the specific adjustment amount for the second adaptation parameter is calculated, and a conversion algorithm is used to generate target adaptation parameters compatible with each brand. The resulting target parameters are adjusted to avoid conflicts with the same parameters of different brands while maintaining compatibility with the original device model. If the device models correspond to different brands, check one by one whether the first adaptation parameter values of the models under these different brands are repeated. The judgment method can be to compare the parameters one by one, or to convert the parameters into feature codes and then judge. If there are repeated parameters, disambiguation processing is required. If all parameters are not repeated, the first adaptation parameter can be directly used as the target parameter. By judging whether there are repeated parameters between different brands, it is possible to avoid the situation where the same parameter value is reused and the devices of different brands affect each other, thereby ensuring the parameter certainty and uniqueness of the code library. After judging that there are no duplicate first parameters of different brands, all first adaptation parameters are directly traversed. Since it is known that these parameters are not repeated, no additional processing is required, and each first adaptation parameter is directly mapped to its device model as the target adaptation parameter of the model. In this way, the adjustment process of repeated parameters is skipped and the target parameter is directly output.
[0069] Based on the above embodiment, when different brands have different second adaptation parameters and there is no duplication, the second adaptation parameter needs to be adjusted to distinguish device models of different brands. The specific steps of adjusting the second adaptation parameter include S31 to S33:
[0070] S31: Determine, based on the device model corresponding to the second adaptation parameter, second brand standard adaptation parameters corresponding to different brands for each device model.
[0071] For example, after determining that there are repeated second adaptation parameters, in order to make adjustments to these repeated parameters, it is necessary to first obtain the brand information of the device model corresponding to each repeated parameter, as well as the standard adaptation parameters of each brand. The reason for obtaining the brand's standard parameters is that devices of different brands often have different coding rules. In order to adjust the repeated parameters to make them compatible with the corresponding brand, it is necessary to first understand the parameter standards of each brand. During specific implementation, the device model corresponding to each parameter is found out based on the repeated second adaptation parameters. Then the brand information of each model is further determined. Based on the brand information, the coding characteristics, format standards, frequency parameters and other rules of each brand are queried to obtain the standard adaptation parameter range and requirements of the brand. By obtaining the standard parameters of each brand, a basis is provided for the subsequent calculation of the target value for adjusting the repeated parameters, so that the adjusted parameters can match the corresponding brand standards and avoid the problem of control conflicts.
[0072] S32: Determine a second adaptation parameter correction value of the device model corresponding to the second adaptation parameter according to each second brand standard adaptation parameter and the second adaptation parameter.
[0073] For example, on the basis of obtaining the standard adaptation parameters of each brand, it is necessary to calculate the difference between the repeated second adaptation parameters and the standard parameters of each brand to determine the correction value to adjust the second adaptation parameter. The correction value is determined because only by quantifying the specific size of the second adaptation parameter that needs to be adjusted can it be corrected in a targeted manner so that it is no longer repeated and conforms to the characteristics of the corresponding brand. In specific implementation, each repeated second adaptation parameter is compared with the brand standard adaptation parameter of the corresponding device model, and the difference is calculated one by one, such as the frequency difference in Hz. The calculated difference value is the correction value of the second adaptation parameter for the brand. After repeated comparisons, the correction value of each second adaptation parameter for each brand can be obtained. By determining the correction value, the second adaptation parameter can be directionally corrected according to the value, so that it eliminates duplication with other brands without affecting the original matching, and obtains the target adaptation parameter that can ensure uniqueness.
[0074] S33: Determine a second target adaptation parameter correction value according to each second adaptation parameter correction value, and adjust the second adaptation parameter according to the second target adaptation parameter correction value to obtain a target adaptation parameter.
[0075] For example, after obtaining the correction value of each second adaptation parameter for each brand, a second target correction value is comprehensively determined, and this is used to uniformly adjust the second adaptation parameters to obtain non-repetitive target parameters. A target correction value is calculated because multiple correction values for different brands need to be further integrated to obtain an overall adjustment index so that the repeated parameters can be corrected according to the same standard so that they are consistent with the original matching and eliminate duplication. In specific implementation, first, multiple sets of correction values for each second adaptation parameter for different brands are counted. The average value can be taken as the target correction value, or the weight can be calculated after comprehensively considering the importance weights of different brands. After obtaining the target correction value, the corresponding second adaptation parameter is corrected and calculated using this unified standard value. Through the parameter conversion and adjustment algorithm, the target adaptation parameter with duplication eliminated and matching maintained is finally output. Through further fusion processing of the correction value, a unified and optimized correction benchmark can be obtained, and this is used to adjust the repeated parameters, which is compatible with the original matching and solves the duplication problem, and obtains the target parameter.
[0076] S40: Storing the target adaptation parameters in a database of the target product.
[0077] Specifically, after file parsing, parameter adjustment, and device model and brand adaptation, a set of optimized target adaptation parameters is obtained that matches different target devices. These parameters need to be stored in a database to achieve persistent storage and unified management. For implementation, an online database built in the cloud was chosen rather than a local database. This was chosen because cloud databases offer advantages such as large capacity and strong scalability, allowing for continuous storage of a large number of target parameters. Local databases, however, have limited capacity and scalability. After obtaining the target parameters, the parameter values are stored in the corresponding table fields in the cloud database through a designated database interface, indexed by parameter name, device model, and other factors. Auxiliary information such as the time of parameter generation and the degree of parameter optimization can also be entered. After loading, these parameters are persisted and can be accessed in real time on the cloud. Storing the parameters in the cloud database optimizes parameter management in terms of storage capacity, scalability, and access efficiency, providing data support for subsequent mass production and deployment of the product.
[0078] In another optional embodiment of the present application, a verification process is also included before the target adaptation parameters are stored in the database: before the target adaptation parameters are stored in the cloud database, the parameters need to be verified to determine whether they are within the preset standard parameter range. This step is to ensure that the generated parameters follow normal technical specifications. If they exceed the standard range, they need to be readjusted and generated. During specific implementation, the standard range of the parameters, such as format range, upper and lower frequency limits, etc., is determined in advance based on industry standards, consumer group preferences, etc. After obtaining the target parameters, determine one by one whether they are within this standard range. As long as one parameter exceeds, it is marked as non-compliant. For non-compliant target parameters, they cannot be directly stored in the database, and it is necessary to re-enter the parameter adjustment process according to the device model to check whether there are any errors in the parsing file or adjustment algorithm until the generated target parameters meet the standard range requirements, and then the parameters are stored. By checking the standardization of the parameters, it is possible to avoid unreasonable target parameters entering the database and causing errors, ensuring the correctness and consistency of the code base, and avoiding equipment out-of-control problems caused by parameter errors.
[0079] Reference Figure 2 , is a code library data storage system provided in an embodiment of the present application, the system includes: a data acquisition module, a parameter matching module, a parameter adjustment module, and a data storage module, wherein:
[0080] The data acquisition module is used to obtain the data file of the target product, parse the data file and obtain key parameters;
[0081] A parameter matching module is used to determine multiple device models that the target product can adapt to, and adjust key parameters according to each device model to obtain the first adaptation parameters corresponding to each device model;
[0082] a parameter adjustment module, configured to adjust each first adaptation parameter according to device brand information to obtain a target adaptation parameter, wherein the device brand information includes at least one device model;
[0083] The data storage module is used to store the target adaptation parameters into the database of the target product.
[0084] Based on the above embodiment, the parameter matching module is further configured to determine, based on each device model, a first main format, a first main frequency, a first main user code, and a first key code value corresponding to each device model; adjust the main format based on the first main format to obtain a second main format; adjust the main frequency based on the first main frequency to obtain a second main frequency; adjust the main user code and the key code value based on the first main user code and the first key code value to obtain a second main user code and a second key code value; and use the second main format, the second main frequency, the second main user code, and the second key code value as first adaptation parameters.
[0085] Based on the above embodiment, the parameter adjustment module is also used to determine multiple brand device models based on the device brand information if the device brand information corresponding to each device model is the same brand; judge whether the first adaptation parameter matches the device model of each brand; if the first adaptation parameter matches the device model of each brand, use the first adaptation parameter as the target adaptation parameter; if the first adaptation parameter does not match the device model of each brand, adjust the first adaptation parameter according to the device model of each brand to obtain the target adaptation parameter.
[0086] Based on the above embodiment, the parameter adjustment module also includes determining the first brand standard adaptation parameters corresponding to each brand device model according to each brand device model; determining the first adaptation parameter correction value corresponding to each brand device model according to each brand standard adaptation parameter and the first adaptation parameter; determining the first target adaptation parameter correction value according to each first adaptation parameter correction value, and adjusting the first adaptation parameter according to the first target adaptation parameter correction value to obtain the target adaptation parameter.
[0087] Based on the above embodiment, the parameter adjustment module also includes determining whether the first adaptation parameters corresponding to the device models under different brands are repeated if the device brand information corresponding to each device model is a different brand; if there is a repeated second adaptation parameter in each first adaptation parameter, the second adaptation parameter is adjusted according to the device model corresponding to the second adaptation parameter to obtain the target adaptation parameter; if there is no repeated first adaptation parameter, the first adaptation parameter is used as the target adaptation parameter.
[0088] Based on the above embodiment, the parameter adjustment module also includes determining the second brand standard adaptation parameters of different brands corresponding to each device model according to the device model corresponding to the second adaptation parameter; determining the second adaptation parameter correction value of the device model corresponding to the second adaptation parameter according to each second brand standard adaptation parameter and the second adaptation parameter; determining the second target adaptation parameter correction value according to each second adaptation parameter correction value, and adjusting the second adaptation parameter according to the second target adaptation parameter correction value to obtain the target adaptation parameter.
[0089] Based on the above embodiment, the data storage module is further used to determine whether the target adaptation parameter exceeds the preset standard parameter range; if the target adaptation parameter exceeds the preset standard parameter range, the step of adjusting the key parameters according to each device model is repeated.
[0090] It should be noted that the above embodiments provide devices that implement their functions using only the division of the above functional modules as examples. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0091] This application also discloses an electronic device. Figure 3 , Figure 3 The electronic device 300 may include: at least one processor 301 , at least one network interface 304 , a user interface 303 , a memory 305 , and at least one communication bus 302 .
[0092] The communication bus 302 is used to implement the connection and communication between these components.
[0093] The user interface 303 may include a display interface and a camera interface. Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.
[0094] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0095] The processor 301 may include one or more processing cores. Using various interfaces and circuits, the processor 301 connects to various components within the server. It executes instructions, programs, code sets, or instruction sets stored in the memory 305, as well as accesses data stored in the memory 305, to perform various server functions and process data. Optionally, the processor 301 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 301 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface graphics, and application programs; the GPU is responsible for rendering and drawing content displayed on the display screen; and the modem handles wireless communications. It is understood that the modem may also be implemented as a separate chip, rather than integrated into the processor 301.
[0096] Among them, the memory 305 may include a random access memory (RAM) or a read-only memory (Read-Only Memory). Optionally, the memory 305 includes a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 305 may also optionally be at least one storage device located away from the aforementioned processor 301. Refer to Figure 3 , the memory 305 as a computer storage medium may include an operating system, a network communication module, a user interface module and an application program of a code library data storage method.
[0097] exist Figure 3In the electronic device 300 shown, the user interface 303 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 301 can be used to call an application program that stores a code library data storage method in the memory 305. When executed by one or more processors 301, the electronic device 300 executes one or more methods in the above embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should know that this application is not limited to the described order of actions, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for this application.
[0098] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0099] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely schematic, such as the division of units, which is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interface, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0100] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0101] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0102] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of this application, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of this application. The aforementioned memory includes various media that can store program code, such as USB flash drives, mobile hard drives, magnetic disks, or optical disks.
[0103] The above are merely exemplary embodiments of the present disclosure and are not intended to limit the scope of the present disclosure. In other words, any equivalent variations and modifications made in accordance with the teachings of the present disclosure are still within the scope of the present disclosure. Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the disclosure and the practical implications thereof.
[0104] This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not described herein. The description and examples are to be considered as exemplary only, and the scope and spirit of the present disclosure are to be defined by the claims.
Claims
1. A method for storing code database data, characterized in that: include: Obtaining a data file of a target product, parsing the data file to obtain key parameters, specifically comprising: determining a file type, using a parser of a corresponding format to parse the file item by item according to the file structure, obtaining stored technical parameter information, storing a main format, a main frequency, a main user code, and a key code value obtained by parsing the technical parameter information as a structured variable, and obtaining key parameters including the main format, the main frequency, the main user code, and the key code value by parsing the remote control data file; Determine multiple device models that the target product can adapt to, and adjust the key parameters according to each of the device models to obtain first adaptation parameters corresponding to each of the device models; adjusting each of the first adaptation parameters according to device brand information to obtain a target adaptation parameter, wherein the device brand information includes at least one device model; Storing the target adaptation parameters in a database of the target product; The step of adjusting the key parameters according to the device models to obtain the first adaptation parameters corresponding to the device models includes: Determining, according to each of the device models, a first main format, a first main frequency, a first main user code, and a first key code value corresponding to each of the device models; adjusting the master format according to the first master format to obtain a second master format; adjusting the main frequency according to the first main frequency to obtain a second main frequency; adjusting the primary user code and the key code value according to the first primary user code and the first key code value to obtain a second primary user code and a second key code value; using the second main format, the second main frequency, the second main user code, and the second key code value as the first adaptation parameters; The adjusting each of the first adaptation parameters according to the device brand information to obtain a target adaptation parameter includes: If the device brand information corresponding to each device model is the same brand, determining multiple brand device models according to the device brand information; Determining whether the first adaptation parameter matches each of the brand device models; If the first adaptation parameter matches the brand device model, the first adaptation parameter is used as the target adaptation parameter; If the first adaptation parameter does not match the brand device model, adjusting the first adaptation parameter according to the brand device model to obtain the target adaptation parameter; The adjusting the first adaptation parameter according to each brand device model to obtain the target adaptation parameter includes: Determining, based on each of the brand device models, first brand standard adaptation parameters corresponding to each of the brand device models; Determining a first adaptation parameter correction value corresponding to each brand device model according to each brand standard adaptation parameter and the first adaptation parameter; A first target adaptation parameter correction value is determined according to each of the first adaptation parameter correction values, and the first adaptation parameter is adjusted according to the first target adaptation parameter correction value to obtain the target adaptation parameter.
2. The code library data storage method according to claim 1, characterized in that: After adjusting the first adaptation parameters according to the device brand information to obtain target adaptation parameters, the method further includes: If the device brand information corresponding to each device model is a different brand, determining whether the first adaptation parameters corresponding to each device model under the different brands are repeated; If there are repeated second adaptation parameters in each of the first adaptation parameters, adjusting the second adaptation parameters according to the device model corresponding to the second adaptation parameters to obtain the target adaptation parameters; If there is no repeated first adaptation parameter, the first adaptation parameter is used as the target adaptation parameter.
3. The code library data storage method according to claim 2, characterized in that: The adjusting the second adaptation parameter according to the device model corresponding to the second adaptation parameter to obtain the target adaptation parameter includes: Determining, according to the device model corresponding to the second adaptation parameter, second brand standard adaptation parameters of different brands corresponding to each device model; determining, based on each of the second brand standard adaptation parameters and the second adaptation parameter, a second adaptation parameter correction value for the device model corresponding to the second adaptation parameter; A second target adaptation parameter correction value is determined according to each of the second adaptation parameter correction values, and the second adaptation parameter is adjusted according to the second target adaptation parameter correction value to obtain the target adaptation parameter.
4. The method for storing code database data according to claim 1, wherein: Before storing the target adaptation parameters in the database of the target product, the method further includes: Determining whether the target adaptation parameter exceeds a preset standard parameter range; If the target adaptation parameter exceeds the preset standard parameter range, the step of adjusting the key parameter according to each device model is repeated.
5. A code library data storage system, characterized in that: The system comprises: A data acquisition module is used to acquire a data file of a target product, parse the data file, and obtain key parameters. Specifically, the module comprises: determining the file type, using a parser of the corresponding format, parsing the file item by item according to the file structure, acquiring the stored technical parameter information, storing the main format, main frequency, main user code, and key code values obtained from the technical parameter information parsed as structured variables, and obtaining the key parameters including the main format, main frequency, main user code, and key code values by parsing the remote control data file; a parameter matching module, configured to determine a plurality of device models to which the target product is compatible, and adjust the key parameters according to each of the device models to obtain a first adaptation parameter corresponding to each of the device models; a parameter adjustment module, configured to adjust each of the first adaptation parameters according to device brand information to obtain a target adaptation parameter, wherein the device brand information includes at least one device model; A data storage module, used to store the target adaptation parameters in the database of the target product; The step of adjusting the key parameters according to the device models to obtain the first adaptation parameters corresponding to the device models includes: Determining, according to each of the device models, a first main format, a first main frequency, a first main user code, and a first key code value corresponding to each of the device models; adjusting the master format according to the first master format to obtain a second master format; adjusting the main frequency according to the first main frequency to obtain a second main frequency; adjusting the primary user code and the key code value according to the first primary user code and the first key code value to obtain a second primary user code and a second key code value; using the second main format, the second main frequency, the second main user code, and the second key code value as the first adaptation parameters; The adjusting each of the first adaptation parameters according to the device brand information to obtain a target adaptation parameter includes: If the device brand information corresponding to each device model is the same brand, determining multiple brand device models according to the device brand information; Determining whether the first adaptation parameter matches each of the brand device models; If the first adaptation parameter matches the brand device model, the first adaptation parameter is used as the target adaptation parameter; If the first adaptation parameter does not match the brand device model, adjusting the first adaptation parameter according to the brand device model to obtain the target adaptation parameter; The adjusting the first adaptation parameter according to each brand device model to obtain the target adaptation parameter includes: Determining, based on each of the brand device models, first brand standard adaptation parameters corresponding to each of the brand device models; Determining a first adaptation parameter correction value corresponding to each brand device model according to each brand standard adaptation parameter and the first adaptation parameter; A first target adaptation parameter correction value is determined according to each of the first adaptation parameter correction values, and the first adaptation parameter is adjusted according to the first target adaptation parameter correction value to obtain the target adaptation parameter.
6. An electronic device, characterized in that: It includes a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes a code library data warehousing method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed, the steps of the code library data storage method according to any one of claims 1 to 4 are executed.
Citation Information
Patent Citations
Infrared data transmission method and system, and remote control terminal
CN105915989A
Equipment matching method and device, computer equipment and readable storage medium
CN115206080A